llmz 0.0.2 → 0.0.5

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 (87) hide show
  1. package/dist/chat.d.ts +17 -0
  2. package/dist/chunk-3U57H7GT.js +608 -0
  3. package/dist/{chunk-RB2L33ZR.js → chunk-4EWY34YA.js} +24 -24
  4. package/dist/{chunk-R2N2UUKC.cjs → chunk-4I7UPBLN.cjs} +14 -8
  5. package/dist/{chunk-YPOOKE3A.cjs → chunk-4QTK5ALH.cjs} +59 -28
  6. package/dist/{chunk-BKGPO722.cjs → chunk-5NVNEEYW.cjs} +55 -55
  7. package/dist/{chunk-DFZ6GX5C.js → chunk-5TRUJES5.js} +1 -1
  8. package/dist/{chunk-E2B5DRIC.cjs → chunk-6WT5VZBG.cjs} +362 -26
  9. package/dist/{chunk-7S3UY52U.js → chunk-7WRN4E42.js} +36 -8
  10. package/dist/{chunk-E5W3P7EO.cjs → chunk-EJRCDWBA.cjs} +64 -7
  11. package/dist/{chunk-VP6WWAE2.cjs → chunk-FIVFS4HG.cjs} +2 -2
  12. package/dist/{chunk-3T465BEW.js → chunk-HP7RKM25.js} +63 -6
  13. package/dist/{chunk-YUDUY7XW.cjs → chunk-HYVKY3W6.cjs} +23 -24
  14. package/dist/{chunk-PQN6HW7A.cjs → chunk-IKSIOIIP.cjs} +3 -3
  15. package/dist/{chunk-ZUAFUOUR.cjs → chunk-JDABP4SD.cjs} +3 -3
  16. package/dist/{chunk-RJHDQL4C.js → chunk-JKVVQN2P.js} +1 -1
  17. package/dist/{chunk-MSTBEKOQ.js → chunk-JQBT7UWN.js} +3 -3
  18. package/dist/{chunk-BOLDQGES.cjs → chunk-KMZDFWYZ.cjs} +3 -3
  19. package/dist/chunk-MU4LFVY7.cjs +608 -0
  20. package/dist/{chunk-7FIPXMZR.js → chunk-ORQP26SZ.js} +1 -1
  21. package/dist/{chunk-ENFB45AI.cjs → chunk-P7J2WCBB.cjs} +7 -7
  22. package/dist/{chunk-DILHJIMP.js → chunk-QBXIE6EY.js} +49 -18
  23. package/dist/{chunk-UVSOAH2H.js → chunk-QT4QF3YA.js} +1 -1
  24. package/dist/{chunk-6QDFMQHA.js → chunk-S6FOL2HY.js} +8 -2
  25. package/dist/{chunk-ZSRC3TN4.js → chunk-UNMKB2DA.js} +9 -10
  26. package/dist/{chunk-3CGLDS5T.cjs → chunk-UQOBUJIQ.cjs} +38 -10
  27. package/dist/{chunk-QPSUMPLP.js → chunk-WLUVY5QU.js} +345 -9
  28. package/dist/citations.d.ts +63 -0
  29. package/dist/component-R2Y74VUI.js +16 -0
  30. package/dist/component-TSNW3SC7.cjs +16 -0
  31. package/dist/component.d.ts +26 -17
  32. package/dist/component.default.d.ts +314 -8
  33. package/dist/context.d.ts +9 -6
  34. package/dist/dual-modes-UHNDHNIF.cjs +12 -0
  35. package/dist/dual-modes-ZUQKPJFH.js +12 -0
  36. package/dist/exit-KJ4COC5N.cjs +8 -0
  37. package/dist/exit-OIYZLBVJ.js +8 -0
  38. package/dist/exit.d.ts +6 -0
  39. package/dist/getter.d.ts +1 -1
  40. package/dist/index.cjs +256 -160
  41. package/dist/index.d.ts +7 -4
  42. package/dist/index.js +242 -146
  43. package/dist/{jsx-CJ2RBODH.js → jsx-AEHVFB3L.js} +2 -3
  44. package/dist/jsx-AJAXBWFE.cjs +13 -0
  45. package/dist/llmz-VDA4M42R.cjs +604 -0
  46. package/dist/llmz-YE5N54IU.js +604 -0
  47. package/dist/llmz.d.ts +8 -10
  48. package/dist/snapshots.d.ts +9 -1
  49. package/dist/tool-LY77IWV2.js +11 -0
  50. package/dist/tool-SWJYOR2Z.cjs +11 -0
  51. package/dist/tool.d.ts +34 -9
  52. package/dist/truncator-NYN7BGKJ.cjs +10 -0
  53. package/dist/truncator-WAL2GCUY.js +10 -0
  54. package/dist/types.d.ts +9 -1
  55. package/dist/typings-AIV2OASX.js +10 -0
  56. package/dist/typings-XR6CYHW4.cjs +10 -0
  57. package/dist/{utils-TS23YJPE.js → utils-L5GLCS3C.js} +2 -3
  58. package/dist/utils-QC4I2L6R.cjs +37 -0
  59. package/dist/vm-GJ5R72AP.cjs +12 -0
  60. package/dist/vm-ZUQOSRRM.js +12 -0
  61. package/dist/vm.d.ts +1 -1
  62. package/package.json +8 -6
  63. package/dist/chunk-A7BDFLAE.cjs +0 -30
  64. package/dist/chunk-C2TSWGYC.cjs +0 -91
  65. package/dist/chunk-Q4DEJGXD.js +0 -344
  66. package/dist/chunk-QZGFCB4T.cjs +0 -344
  67. package/dist/chunk-UG2GCPHF.js +0 -91
  68. package/dist/chunk-YSQDPG26.js +0 -30
  69. package/dist/component-DWBRHLEN.cjs +0 -9
  70. package/dist/component-R3ZAVXUC.js +0 -9
  71. package/dist/dual-modes-2VDEOJ5D.js +0 -13
  72. package/dist/dual-modes-3MH5N6RY.cjs +0 -13
  73. package/dist/exit-GYMXZZ4I.js +0 -9
  74. package/dist/exit-PQHMJEOG.cjs +0 -9
  75. package/dist/jsx-PPLE5YTB.cjs +0 -14
  76. package/dist/llmz-EGTGPSTX.cjs +0 -1049
  77. package/dist/llmz-WY74UVE3.js +0 -1049
  78. package/dist/tool-AY47ML65.cjs +0 -12
  79. package/dist/tool-WVIPESKN.js +0 -12
  80. package/dist/truncator-MTONQESU.js +0 -11
  81. package/dist/truncator-ZKPOW2I3.cjs +0 -11
  82. package/dist/typings-HTYLRNIC.js +0 -11
  83. package/dist/typings-QRJGGNUM.cjs +0 -11
  84. package/dist/utils-UR4IMUHC.cjs +0 -38
  85. package/dist/vm-4JFSZAMR.cjs +0 -13
  86. package/dist/vm-SMMA664M.js +0 -13
  87. package/patches/source-map-js@1.2.1.patch +0 -16
@@ -1,4 +1,10 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/component.ts
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+ var _chunkKMZDFWYZcjs = require('./chunk-KMZDFWYZ.cjs');
5
+
6
+ // src/component.ts
7
+ var _zui = require('@bpinternal/zui');
2
8
  function assertValidComponent(component) {
3
9
  if (!component.name) {
4
10
  throw new Error("Component must have a name");
@@ -32,6 +38,16 @@ function assertValidComponent(component) {
32
38
  throw new Error("Container component must have container props and children");
33
39
  }
34
40
  }
41
+ var getDefaultValue = (schema) => {
42
+ if (schema._def.defaultValue !== void 0) {
43
+ if (typeof schema._def.defaultValue === "function") {
44
+ return String(schema._def.defaultValue()).toString();
45
+ } else {
46
+ return String(schema._def.defaultValue);
47
+ }
48
+ }
49
+ return "";
50
+ };
35
51
  function getComponentReference(component) {
36
52
  let doc = `### <${component.name}>
37
53
 
@@ -40,12 +56,35 @@ function getComponentReference(component) {
40
56
 
41
57
  `;
42
58
  const getPropsDoc = (props) => {
43
- if (props.length === 0)
59
+ const shape = props.shape;
60
+ if (Object.keys(shape).length === 0)
44
61
  return "_No props._\n\n";
45
- return props.map((prop) => {
46
- const required = prop.required ? "**(required)**" : "(optional)";
47
- const def = prop.default !== void 0 ? ` _Default: \`${prop.default}\`_` : "";
48
- return `- \`${prop.name}: ${prop.type}\` ${required} \u2014 ${prop.description || ""}${def}`;
62
+ const zodTypeToTsType = {
63
+ ZodString: "string",
64
+ ZodNumber: "number",
65
+ ZodBoolean: "boolean",
66
+ ZodEnum: "enum",
67
+ ZodArray: "array",
68
+ ZodObject: "object",
69
+ ZodDate: "date",
70
+ ZodBigInt: "bigint",
71
+ ZodSymbol: "symbol",
72
+ ZodUndefined: "undefined",
73
+ ZodNull: "null",
74
+ ZodVoid: "void",
75
+ ZodNever: "never",
76
+ ZodUnknown: "unknown",
77
+ ZodAny: "any"
78
+ };
79
+ return Object.entries(shape).map(([name, schema]) => {
80
+ const naked = schema.naked();
81
+ const zodType = naked._def.typeName;
82
+ const defValue = getDefaultValue(schema);
83
+ const typings = naked instanceof _zui.z.ZodEnum ? naked._def.values.map((x) => `"${x}"`).join(" | ") : zodTypeToTsType[zodType] || zodType;
84
+ const required = !schema.isOptional() ? "**(required)**" : "(optional)";
85
+ const def = defValue ? ` _Default: \`${defValue}\`_` : "";
86
+ const description = schema.description || schema.naked().description || (schema == null ? void 0 : schema._def.description) || "";
87
+ return `- \`${name}: ${typings}\` ${required} \u2014 ${description}${def}`;
49
88
  }).join("\n") + "\n\n";
50
89
  };
51
90
  const getChildrenDoc = (children) => {
@@ -89,8 +128,26 @@ ${example.code.trim()}
89
128
  }
90
129
  return doc.trim();
91
130
  }
131
+ var Component = class {
132
+
133
+
134
+ // phantom type for inference
135
+ constructor(definition) {
136
+ assertValidComponent(definition);
137
+ this.definition = definition;
138
+ }
139
+ };
140
+ function isComponent(rendered, component) {
141
+ return _chunkKMZDFWYZcjs.isJsxComponent.call(void 0, component.definition.name, rendered);
142
+ }
143
+ function isAnyComponent(message) {
144
+ return _chunkKMZDFWYZcjs.isAnyJsxComponent.call(void 0, message);
145
+ }
146
+
147
+
148
+
92
149
 
93
150
 
94
151
 
95
152
 
96
- exports.assertValidComponent = assertValidComponent; exports.getComponentReference = getComponentReference;
153
+ exports.assertValidComponent = assertValidComponent; exports.getComponentReference = getComponentReference; exports.Component = Component; exports.isComponent = isComponent; exports.isAnyComponent = isAnyComponent;
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunkENFB45AIcjs = require('./chunk-ENFB45AI.cjs');
3
+ var _chunkP7J2WCBBcjs = require('./chunk-P7J2WCBB.cjs');
4
4
 
5
5
  // src/truncator.ts
6
6
  var DEFAULT_REMOVE_CHUNK = 250;
@@ -25,7 +25,7 @@ function truncateWrappedContent({
25
25
  throwOnFailure = true
26
26
  }) {
27
27
  var _a, _b, _c;
28
- const tokenizer = _chunkENFB45AIcjs.getTokenizer.call(void 0, );
28
+ const tokenizer = _chunkP7J2WCBBcjs.getTokenizer.call(void 0, );
29
29
  const parts = [];
30
30
  for (const msg of messages) {
31
31
  const current = [];
@@ -1,4 +1,10 @@
1
+ import {
2
+ isAnyJsxComponent,
3
+ isJsxComponent
4
+ } from "./chunk-ORQP26SZ.js";
5
+
1
6
  // src/component.ts
7
+ import { z } from "@bpinternal/zui";
2
8
  function assertValidComponent(component) {
3
9
  if (!component.name) {
4
10
  throw new Error("Component must have a name");
@@ -32,6 +38,16 @@ function assertValidComponent(component) {
32
38
  throw new Error("Container component must have container props and children");
33
39
  }
34
40
  }
41
+ var getDefaultValue = (schema) => {
42
+ if (schema._def.defaultValue !== void 0) {
43
+ if (typeof schema._def.defaultValue === "function") {
44
+ return String(schema._def.defaultValue()).toString();
45
+ } else {
46
+ return String(schema._def.defaultValue);
47
+ }
48
+ }
49
+ return "";
50
+ };
35
51
  function getComponentReference(component) {
36
52
  let doc = `### <${component.name}>
37
53
 
@@ -40,12 +56,35 @@ function getComponentReference(component) {
40
56
 
41
57
  `;
42
58
  const getPropsDoc = (props) => {
43
- if (props.length === 0)
59
+ const shape = props.shape;
60
+ if (Object.keys(shape).length === 0)
44
61
  return "_No props._\n\n";
45
- return props.map((prop) => {
46
- const required = prop.required ? "**(required)**" : "(optional)";
47
- const def = prop.default !== void 0 ? ` _Default: \`${prop.default}\`_` : "";
48
- return `- \`${prop.name}: ${prop.type}\` ${required} \u2014 ${prop.description || ""}${def}`;
62
+ const zodTypeToTsType = {
63
+ ZodString: "string",
64
+ ZodNumber: "number",
65
+ ZodBoolean: "boolean",
66
+ ZodEnum: "enum",
67
+ ZodArray: "array",
68
+ ZodObject: "object",
69
+ ZodDate: "date",
70
+ ZodBigInt: "bigint",
71
+ ZodSymbol: "symbol",
72
+ ZodUndefined: "undefined",
73
+ ZodNull: "null",
74
+ ZodVoid: "void",
75
+ ZodNever: "never",
76
+ ZodUnknown: "unknown",
77
+ ZodAny: "any"
78
+ };
79
+ return Object.entries(shape).map(([name, schema]) => {
80
+ const naked = schema.naked();
81
+ const zodType = naked._def.typeName;
82
+ const defValue = getDefaultValue(schema);
83
+ const typings = naked instanceof z.ZodEnum ? naked._def.values.map((x) => `"${x}"`).join(" | ") : zodTypeToTsType[zodType] || zodType;
84
+ const required = !schema.isOptional() ? "**(required)**" : "(optional)";
85
+ const def = defValue ? ` _Default: \`${defValue}\`_` : "";
86
+ const description = schema.description || schema.naked().description || (schema == null ? void 0 : schema._def.description) || "";
87
+ return `- \`${name}: ${typings}\` ${required} \u2014 ${description}${def}`;
49
88
  }).join("\n") + "\n\n";
50
89
  };
51
90
  const getChildrenDoc = (children) => {
@@ -89,8 +128,26 @@ ${example.code.trim()}
89
128
  }
90
129
  return doc.trim();
91
130
  }
131
+ var Component = class {
132
+ definition;
133
+ propsType;
134
+ // phantom type for inference
135
+ constructor(definition) {
136
+ assertValidComponent(definition);
137
+ this.definition = definition;
138
+ }
139
+ };
140
+ function isComponent(rendered, component) {
141
+ return isJsxComponent(component.definition.name, rendered);
142
+ }
143
+ function isAnyComponent(message) {
144
+ return isAnyJsxComponent(message);
145
+ }
92
146
 
93
147
  export {
94
148
  assertValidComponent,
95
- getComponentReference
149
+ getComponentReference,
150
+ Component,
151
+ isComponent,
152
+ isAnyComponent
96
153
  };
@@ -1,11 +1,11 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }
2
2
 
3
- var _chunkZUAFUOURcjs = require('./chunk-ZUAFUOUR.cjs');
3
+ var _chunkJDABP4SDcjs = require('./chunk-JDABP4SD.cjs');
4
4
 
5
5
 
6
6
 
7
7
 
8
- var _chunkENFB45AIcjs = require('./chunk-ENFB45AI.cjs');
8
+ var _chunkP7J2WCBBcjs = require('./chunk-P7J2WCBB.cjs');
9
9
 
10
10
  // src/typings.ts
11
11
  var _zui = require('@bpinternal/zui');
@@ -38,7 +38,7 @@ async function formatTypings(typings, options) {
38
38
  return result;
39
39
  } catch (err) {
40
40
  if (options == null ? void 0 : options.throwOnError) {
41
- throw new (0, _chunkZUAFUOURcjs.CodeFormattingError)(err instanceof Error ? err.message : _nullishCoalesce((err == null ? void 0 : err.toString()), () => ( "Unknown Error")), typings);
41
+ throw new (0, _chunkJDABP4SDcjs.CodeFormattingError)(err instanceof Error ? err.message : _nullishCoalesce((err == null ? void 0 : err.toString()), () => ( "Unknown Error")), typings);
42
42
  }
43
43
  return typings;
44
44
  }
@@ -89,14 +89,12 @@ async function getTypings(schema, options) {
89
89
  options ??= {};
90
90
  options.declaration ??= false;
91
91
  let wrappedSchema = schema;
92
- if (options == null ? void 0 : options.declaration) {
93
- if (schema instanceof _zui.z.Schema) {
94
- const title = "title" in schema.ui ? schema.ui.title : null;
95
- if (!title) {
96
- throw new Error('Only schemas with "title" Zui property can be declared.');
97
- }
98
- wrappedSchema = new Declaration(schema, title);
92
+ if ((options == null ? void 0 : options.declaration) && schema instanceof _zui.z.Schema) {
93
+ const title = "title" in schema.ui ? schema.ui.title : null;
94
+ if (!title) {
95
+ throw new Error('Only schemas with "title" Zui property can be declared.');
99
96
  }
97
+ wrappedSchema = new Declaration(schema, title);
100
98
  }
101
99
  let dts = await sUnwrapZodRecursive(wrappedSchema, { ...options });
102
100
  dts = await formatTypings(dts, { throwOnError: false });
@@ -113,7 +111,7 @@ async function sUnwrapZod(schema, options) {
113
111
  parent: schema
114
112
  };
115
113
  if (schema instanceof Declaration) {
116
- const description = _chunkENFB45AIcjs.getMultilineComment.call(void 0, schema.schema.description);
114
+ const description = _chunkP7J2WCBBcjs.getMultilineComment.call(void 0, schema.schema.description);
117
115
  const withoutDesc = schema.schema.describe("");
118
116
  const typings = await sUnwrapZodRecursive(withoutDesc, { ...newOptions, declaration: true });
119
117
  const isLargeDeclaration = typings.split("\n").length >= LARGE_DECLARATION_LINES;
@@ -134,7 +132,7 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
134
132
  const optionalToken = schema.key.endsWith("?") ? "" : "?";
135
133
  return sUnwrapZodRecursive(new KeyValue(schema.key + optionalToken, innerType), newOptions);
136
134
  }
137
- const description = _chunkENFB45AIcjs.getMultilineComment.call(void 0, schema.value._def.description || schema.value.description);
135
+ const description = _chunkP7J2WCBBcjs.getMultilineComment.call(void 0, schema.value._def.description || schema.value.description);
138
136
  const delimiter = (description == null ? void 0 : description.trim().length) > 0 ? "\n" : "";
139
137
  const withoutDesc = schema.value.describe("");
140
138
  return `${delimiter}${description}${delimiter}${schema.key}: ${await sUnwrapZodRecursive(withoutDesc, newOptions)}${delimiter}`;
@@ -145,13 +143,14 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
145
143
  for (let i = 0; i < schema.schema.items.length; i++) {
146
144
  const argName = _nullishCoalesce(((_b = (_a = schema.schema.items[i]) == null ? void 0 : _a.ui) == null ? void 0 : _b.title), () => ( `arg${i}`));
147
145
  const item = schema.schema.items[i];
148
- args += `${await sUnwrapZodRecursive(new KeyValue(_chunkENFB45AIcjs.toPropertyKey.call(void 0, argName), item), newOptions)}, `;
146
+ args += `${await sUnwrapZodRecursive(new KeyValue(_chunkP7J2WCBBcjs.toPropertyKey.call(void 0, argName), item), newOptions)}, `;
149
147
  }
150
148
  return args;
151
149
  }
150
+ const isLiteral = schema.schema.naked() instanceof _zui.z.ZodLiteral;
152
151
  const typings = (await sUnwrapZodRecursive(schema.schema, newOptions)).trim();
153
152
  const startsWithPairs = typings.startsWith("{") && typings.endsWith("}") || typings.startsWith("[") && typings.endsWith("]") || typings.startsWith("(") && typings.endsWith(")") || typings.startsWith("Array<") && typings.endsWith(">") || typings.startsWith("Record<") && typings.endsWith(">") || isArrayOfPrimitives(typings);
154
- if (startsWithPairs) {
153
+ if (startsWithPairs || isLiteral) {
155
154
  return `args: ${typings}`;
156
155
  } else {
157
156
  return typings;
@@ -179,7 +178,7 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
179
178
  return `Promise<${await sUnwrapZodRecursive(schema.unwrap(), newOptions)}>`;
180
179
  }
181
180
  if (schema instanceof _zui.z.ZodFunction) {
182
- const description = _chunkENFB45AIcjs.getMultilineComment.call(void 0, schema._def.description);
181
+ const description = _chunkP7J2WCBBcjs.getMultilineComment.call(void 0, schema._def.description);
183
182
  const input = await sUnwrapZodRecursive(new FnParameters(schema._def.args), newOptions);
184
183
  const output = await sUnwrapZodRecursive(new FnReturn(schema._def.returns), newOptions);
185
184
  if (options == null ? void 0 : options.declaration) {
@@ -197,7 +196,7 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
197
196
  return `Array<${item}>`;
198
197
  }
199
198
  if (schema instanceof _zui.z.ZodEnum) {
200
- const values = schema._def.values.map(_chunkENFB45AIcjs.escapeString);
199
+ const values = schema._def.values.map(_chunkP7J2WCBBcjs.escapeString);
201
200
  return values.join(" | ");
202
201
  }
203
202
  if (schema instanceof _zui.z.ZodTuple) {
@@ -222,7 +221,7 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
222
221
  const props = await Promise.all(
223
222
  Object.entries(schema.shape).map(async ([key, value]) => {
224
223
  if (value instanceof _zui.z.Schema) {
225
- return sUnwrapZodRecursive(new KeyValue(_chunkENFB45AIcjs.toPropertyKey.call(void 0, key), value), newOptions);
224
+ return sUnwrapZodRecursive(new KeyValue(_chunkP7J2WCBBcjs.toPropertyKey.call(void 0, key), value), newOptions);
226
225
  }
227
226
  return `${key}: unknown`;
228
227
  })
@@ -230,11 +229,11 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
230
229
  return `{ ${props.join("; ")} }`;
231
230
  }
232
231
  if (schema instanceof _zui.z.ZodString) {
233
- const description = _chunkENFB45AIcjs.getMultilineComment.call(void 0, schema._def.description);
232
+ const description = _chunkP7J2WCBBcjs.getMultilineComment.call(void 0, schema._def.description);
234
233
  return `${description} string`.trim();
235
234
  }
236
235
  if (schema instanceof _zui.z.ZodUnion) {
237
- const description = _chunkENFB45AIcjs.getMultilineComment.call(void 0, schema._def.description);
236
+ const description = _chunkP7J2WCBBcjs.getMultilineComment.call(void 0, schema._def.description);
238
237
  const options2 = await Promise.all(
239
238
  schema.options.map(async (option) => {
240
239
  return sUnwrapZodRecursive(option, newOptions);
@@ -244,16 +243,16 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
244
243
  ${options2.join(" | ")}`;
245
244
  }
246
245
  if (schema instanceof _zui.z.ZodLiteral) {
247
- const description = _chunkENFB45AIcjs.getMultilineComment.call(void 0, schema._def.description);
246
+ const description = _chunkP7J2WCBBcjs.getMultilineComment.call(void 0, schema._def.description);
248
247
  return `${description}
249
- ${typeof schema.value === "string" ? _chunkENFB45AIcjs.escapeString.call(void 0, schema.value) : schema.value}`.trim();
248
+ ${typeof schema.value === "string" ? _chunkP7J2WCBBcjs.escapeString.call(void 0, schema.value) : schema.value}`.trim();
250
249
  }
251
250
  if (schema instanceof _zui.z.ZodNumber) {
252
- const description = _chunkENFB45AIcjs.getMultilineComment.call(void 0, schema._def.description);
251
+ const description = _chunkP7J2WCBBcjs.getMultilineComment.call(void 0, schema._def.description);
253
252
  return `${description} number`.trim();
254
253
  }
255
254
  if (schema instanceof _zui.z.ZodBoolean) {
256
- const description = _chunkENFB45AIcjs.getMultilineComment.call(void 0, schema._def.description);
255
+ const description = _chunkP7J2WCBBcjs.getMultilineComment.call(void 0, schema._def.description);
257
256
  return `${description} boolean`.trim();
258
257
  }
259
258
  if (schema instanceof _zui.z.ZodCatch) {
@@ -263,7 +262,7 @@ ${typeof schema.value === "string" ? _chunkENFB45AIcjs.escapeString.call(void 0,
263
262
  return sUnwrapZodRecursive(schema._def.getter(), newOptions);
264
263
  }
265
264
  if (schema instanceof _zui.z.ZodRecord) {
266
- const description = _chunkENFB45AIcjs.getMultilineComment.call(void 0, schema._def.description);
265
+ const description = _chunkP7J2WCBBcjs.getMultilineComment.call(void 0, schema._def.description);
267
266
  const keyType = await sUnwrapZodRecursive(schema._def.keyType, newOptions);
268
267
  const valueType = await sUnwrapZodRecursive(schema._def.valueType, newOptions);
269
268
  return `${description} { [key: (${keyType})]: (${valueType}) }`;
@@ -1,14 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/stack-traces.ts
2
2
  var isInternalLine = (line) => {
3
- return line.includes("llmz/src/") || line.includes("\\llmz\\src\\") || line.includes("node_modules");
3
+ return line.includes("/llmz/") || line.includes("\\llmz\\src\\") || line.includes("node_modules");
4
4
  };
5
5
  function cleanStackTrace(stack, cleanInternal = true) {
6
6
  const lines = stack.split("\n");
7
7
  for (let i = 0; i < lines.length; i++) {
8
8
  const line = lines[i];
9
- let llmzIndex = line.indexOf("llmz/src/");
9
+ let llmzIndex = line.indexOf("/llmz/");
10
10
  if (llmzIndex === -1) {
11
- llmzIndex = line.indexOf("\\llmz\\src\\");
11
+ llmzIndex = line.indexOf("\\llmz\\");
12
12
  }
13
13
  if (llmzIndex === -1) {
14
14
  continue;
@@ -1,6 +1,6 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } var _class;
2
2
 
3
- var _chunkPQN6HW7Acjs = require('./chunk-PQN6HW7A.cjs');
3
+ var _chunkIKSIOIIPcjs = require('./chunk-IKSIOIIP.cjs');
4
4
 
5
5
  // src/errors.ts
6
6
  var errorClasses = {};
@@ -33,7 +33,7 @@ var Signals;
33
33
  return JSON.stringify({
34
34
  name: error.constructor.name,
35
35
  message: error.message,
36
- stack: _chunkPQN6HW7Acjs.cleanStackTrace.call(void 0, _nullishCoalesce(error.stack, () => ( ""))),
36
+ stack: _chunkIKSIOIIPcjs.cleanStackTrace.call(void 0, _nullishCoalesce(error.stack, () => ( ""))),
37
37
  properties: { ...error }
38
38
  });
39
39
  }
@@ -52,7 +52,7 @@ var Signals;
52
52
  const errorInstance = new ErrorClass(message);
53
53
  errorInstance.message = message;
54
54
  errorInstance.name = name;
55
- errorInstance.stack = _chunkPQN6HW7Acjs.cleanStackTrace.call(void 0, _nullishCoalesce((error == null ? void 0 : error.stack), () => ( "")));
55
+ errorInstance.stack = _chunkIKSIOIIPcjs.cleanStackTrace.call(void 0, _nullishCoalesce((error == null ? void 0 : error.stack), () => ( "")));
56
56
  Object.assign(errorInstance, properties);
57
57
  if (isWrappedError(errorInstance)) {
58
58
  return maybeDeserializeError(errorInstance);
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  cleanStackTrace
3
- } from "./chunk-MSTBEKOQ.js";
3
+ } from "./chunk-JQBT7UWN.js";
4
4
 
5
5
  // src/errors.ts
6
6
  var errorClasses = {};
@@ -1,14 +1,14 @@
1
1
  // src/stack-traces.ts
2
2
  var isInternalLine = (line) => {
3
- return line.includes("llmz/src/") || line.includes("\\llmz\\src\\") || line.includes("node_modules");
3
+ return line.includes("/llmz/") || line.includes("\\llmz\\src\\") || line.includes("node_modules");
4
4
  };
5
5
  function cleanStackTrace(stack, cleanInternal = true) {
6
6
  const lines = stack.split("\n");
7
7
  for (let i = 0; i < lines.length; i++) {
8
8
  const line = lines[i];
9
- let llmzIndex = line.indexOf("llmz/src/");
9
+ let llmzIndex = line.indexOf("/llmz/");
10
10
  if (llmzIndex === -1) {
11
- llmzIndex = line.indexOf("\\llmz\\src\\");
11
+ llmzIndex = line.indexOf("\\llmz\\");
12
12
  }
13
13
  if (llmzIndex === -1) {
14
14
  continue;
@@ -1,7 +1,7 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunk3CGLDS5Tcjs = require('./chunk-3CGLDS5T.cjs');
4
+ var _chunkUQOBUJIQcjs = require('./chunk-UQOBUJIQ.cjs');
5
5
 
6
6
  // src/jsx.ts
7
7
  var _zui = require('@bpinternal/zui');
@@ -13,9 +13,9 @@ function isJsxComponent(type, component) {
13
13
  }
14
14
  var createJsxComponent = (props) => ({
15
15
  __jsx: true,
16
- type: _chunk3CGLDS5Tcjs.isString_default.call(void 0, props.type) ? props.type.toUpperCase() : "__unknown__",
16
+ type: _chunkUQOBUJIQcjs.isString_default.call(void 0, props.type) ? props.type.toUpperCase() : "__unknown__",
17
17
  children: Array.isArray(props.children) ? props.children : props.children ? [props.children] : [],
18
- props: _chunk3CGLDS5Tcjs.isPlainObject_default.call(void 0, props.props) ? props.props : {}
18
+ props: _chunkUQOBUJIQcjs.isPlainObject_default.call(void 0, props.props) ? props.props : {}
19
19
  });
20
20
  var Jsx = _zui.z.custom(
21
21
  (value) => isAnyJsxComponent(value),