llmz 0.0.81 → 0.0.83
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/{chunk-BJMZIH3M.js → chunk-34GJUS6U.js} +1047 -1047
- package/dist/{chunk-EQ4JDBE5.js → chunk-3T5IU7OU.js} +1 -1
- package/dist/{chunk-H5LCBNN6.cjs → chunk-52QTFQOB.cjs} +18 -18
- package/dist/{chunk-3NVOHQVY.js → chunk-5MAFEI2A.js} +4 -2
- package/dist/{chunk-HBKQKO3R.js → chunk-5Z2SJOGS.js} +3 -3
- package/dist/{chunk-OX3Y2Z5K.cjs → chunk-5ZF6NTYI.cjs} +3 -3
- package/dist/{chunk-TB6TCWEB.cjs → chunk-6KR6VRA6.cjs} +2 -2
- package/dist/{chunk-BXPPMP5X.cjs → chunk-73XYX76S.cjs} +14 -14
- package/dist/{chunk-VXQ2CZ7B.cjs → chunk-CQ3UJW76.cjs} +4 -4
- package/dist/{chunk-22DGAZXC.js → chunk-EFEF2AL7.js} +2 -2
- package/dist/{chunk-7XVBJQ53.cjs → chunk-HC2QZTVT.cjs} +1047 -1047
- package/dist/{chunk-HP3T6PF4.js → chunk-I2CZYEMH.js} +4 -4
- package/dist/{chunk-GFZCNSYW.cjs → chunk-JXD2KJVB.cjs} +23 -23
- package/dist/{chunk-YFG53MRF.js → chunk-MM2FLD3J.js} +1 -1
- package/dist/{chunk-DO7DN4FZ.js → chunk-NPVV3PHY.js} +1 -1
- package/dist/{chunk-5X5TDCMX.cjs → chunk-NQBIU5VM.cjs} +51 -51
- package/dist/{chunk-FQ4QCUTI.cjs → chunk-NWTG73QR.cjs} +10 -8
- package/dist/{chunk-DLV5FJ42.cjs → chunk-RLUTWFAA.cjs} +9 -9
- package/dist/{chunk-2UM7PFM3.js → chunk-VDTORFBP.js} +6 -6
- package/dist/{chunk-E74GBCTT.js → chunk-VLJA22PB.js} +2 -2
- package/dist/{chunk-E6UFMAW7.js → chunk-XTEHT2TK.js} +1 -1
- package/dist/{chunk-X24YFCFY.cjs → chunk-YCLKXXSF.cjs} +28 -28
- package/dist/{component-GVCCL5XU.js → component-2Z3KLWLX.js} +3 -3
- package/dist/component-NNHBHD72.cjs +18 -0
- package/dist/dual-modes-E5HGE35E.cjs +12 -0
- package/dist/dual-modes-VDFZH4YM.js +12 -0
- package/dist/{llmz-BSI7Y6YH.js → execute-CJVHUFYI.js} +536 -416
- package/dist/{llmz-7TDUOEQE.cjs → execute-R6R3A42S.cjs} +543 -423
- package/dist/exit-GKF4EEMZ.js +8 -0
- package/dist/exit-VZASQELZ.cjs +8 -0
- package/dist/index.cjs +49 -49
- package/dist/index.d.ts +1 -1
- package/dist/index.js +22 -22
- package/dist/{jsx-RIPUQSAU.js → jsx-DDZ63UUF.js} +2 -2
- package/dist/jsx-ULPWX5TW.cjs +13 -0
- package/dist/runtime/execute.d.ts +3 -0
- package/dist/runtime/generate.d.ts +10 -0
- package/dist/runtime/interpret-result.d.ts +12 -0
- package/dist/runtime/interpret-result.test.d.ts +1 -0
- package/dist/runtime/tool-wrapper.d.ts +17 -0
- package/dist/runtime/tool-wrapper.test.d.ts +1 -0
- package/dist/{llmz.d.ts → runtime/types.d.ts} +13 -14
- package/dist/runtime/utils.d.ts +10 -0
- package/dist/runtime/vm-context.d.ts +12 -0
- package/dist/tool-4VK7TZV2.cjs +11 -0
- package/dist/tool-JZP3UN2F.js +11 -0
- package/dist/{truncator-HCWH5MJ3.js → truncator-IIRX3MB2.js} +3 -3
- package/dist/truncator-NWENJXMR.cjs +10 -0
- package/dist/typings-SHVPZ5AR.cjs +10 -0
- package/dist/{typings-FPFJ5D5R.js → typings-SKZSSL2M.js} +3 -3
- package/dist/utils-6MFSS4AT.cjs +41 -0
- package/dist/{utils-M5KFPSNZ.js → utils-SYJGSVFW.js} +4 -2
- package/dist/utils.d.ts +1 -0
- package/dist/{vm-KBBQ7U5L.js → vm-PYCKS77H.js} +3 -3
- package/dist/vm-VHB67FVH.cjs +10 -0
- package/package.json +2 -2
- package/dist/component-YMPMWSTU.cjs +0 -18
- package/dist/dual-modes-KOU5YJ3Q.cjs +0 -12
- package/dist/dual-modes-X7YHJBFJ.js +0 -12
- package/dist/exit-A34GODDB.cjs +0 -8
- package/dist/exit-J55SREDL.js +0 -8
- package/dist/jsx-XEUSAKAK.cjs +0 -13
- package/dist/tool-B3DJ3D2F.js +0 -11
- package/dist/tool-IWPZD5OY.cjs +0 -11
- package/dist/truncator-SOO6NHLD.cjs +0 -10
- package/dist/typings-O2FLZGQN.cjs +0 -10
- package/dist/utils-PWX3JPCF.cjs +0 -39
- package/dist/vm-R2XBIWE4.cjs +0 -10
|
@@ -1,16 +1,16 @@
|
|
|
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
|
|
3
|
+
var _chunk73XYX76Scjs = require('./chunk-73XYX76S.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkNWTG73QRcjs = require('./chunk-NWTG73QR.cjs');
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _chunkHC2QZTVTcjs = require('./chunk-HC2QZTVT.cjs');
|
|
14
14
|
|
|
15
15
|
// src/tool.ts
|
|
16
16
|
var _zui = require('@bpinternal/zui');
|
|
@@ -104,8 +104,8 @@ var Tool = (_class = class _Tool {
|
|
|
104
104
|
} else {
|
|
105
105
|
input = _zui.z.any();
|
|
106
106
|
}
|
|
107
|
-
if (!
|
|
108
|
-
const inputExtensions =
|
|
107
|
+
if (!_chunkHC2QZTVTcjs.isEmpty_default.call(void 0, this._staticInputValues)) {
|
|
108
|
+
const inputExtensions = _chunkNWTG73QRcjs.convertObjectToZuiLiterals.call(void 0, this._staticInputValues);
|
|
109
109
|
if (_zui.z.is.zuiObject(input)) {
|
|
110
110
|
input = input.extend(inputExtensions);
|
|
111
111
|
} else if (_zui.z.is.zuiArray(input)) {
|
|
@@ -149,13 +149,13 @@ var Tool = (_class = class _Tool {
|
|
|
149
149
|
*/
|
|
150
150
|
rename(name) {
|
|
151
151
|
const before = this.name;
|
|
152
|
-
if (!
|
|
152
|
+
if (!_chunkNWTG73QRcjs.isValidIdentifier.call(void 0, name)) {
|
|
153
153
|
throw new Error(
|
|
154
154
|
`Invalid name for tool ${name}. A tool name must start with a letter and contain only letters, numbers, and underscores. It must be 1-50 characters long.`
|
|
155
155
|
);
|
|
156
156
|
}
|
|
157
157
|
this.name = name;
|
|
158
|
-
this.aliases =
|
|
158
|
+
this.aliases = _chunkHC2QZTVTcjs.uniq_default.call(void 0, [name, ...this.aliases.map((alias) => alias === before ? name : alias)]);
|
|
159
159
|
return this;
|
|
160
160
|
}
|
|
161
161
|
/**
|
|
@@ -325,7 +325,7 @@ var Tool = (_class = class _Tool {
|
|
|
325
325
|
* ```
|
|
326
326
|
*/
|
|
327
327
|
constructor(props) {;_class.prototype.__init.call(this);_class.prototype.__init2.call(this);
|
|
328
|
-
if (!
|
|
328
|
+
if (!_chunkNWTG73QRcjs.isValidIdentifier.call(void 0, props.name)) {
|
|
329
329
|
throw new Error(
|
|
330
330
|
`Invalid name for tool ${props.name}. A tool name must start with a letter and contain only letters, numbers, and underscores. It must be 1-50 characters long.`
|
|
331
331
|
);
|
|
@@ -350,17 +350,17 @@ var Tool = (_class = class _Tool {
|
|
|
350
350
|
`Invalid aliases for tool ${props.name}. Expected an array, but got type "${typeof props.aliases}"`
|
|
351
351
|
);
|
|
352
352
|
}
|
|
353
|
-
if (props.aliases && props.aliases.some((alias) => !
|
|
353
|
+
if (props.aliases && props.aliases.some((alias) => !_chunkNWTG73QRcjs.isValidIdentifier.call(void 0, alias))) {
|
|
354
354
|
throw new Error(`Invalid aliases for tool ${props.name}. Expected an array of valid identifiers.`);
|
|
355
355
|
}
|
|
356
356
|
if (typeof props.input !== "undefined") {
|
|
357
|
-
if (
|
|
357
|
+
if (_chunkNWTG73QRcjs.isZuiSchema.call(void 0, props.input)) {
|
|
358
358
|
try {
|
|
359
359
|
this.input = _zui.transforms.toJSONSchema(props.input);
|
|
360
360
|
} catch (e6) {
|
|
361
361
|
this.input = _zui.transforms.toJSONSchemaLegacy(props.input);
|
|
362
362
|
}
|
|
363
|
-
} else if (
|
|
363
|
+
} else if (_chunkNWTG73QRcjs.isJsonSchema.call(void 0, props.input)) {
|
|
364
364
|
this.input = props.input;
|
|
365
365
|
} else {
|
|
366
366
|
throw new Error(
|
|
@@ -369,13 +369,13 @@ var Tool = (_class = class _Tool {
|
|
|
369
369
|
}
|
|
370
370
|
}
|
|
371
371
|
if (typeof props.output !== "undefined") {
|
|
372
|
-
if (
|
|
372
|
+
if (_chunkNWTG73QRcjs.isZuiSchema.call(void 0, props.output)) {
|
|
373
373
|
try {
|
|
374
374
|
this.output = _zui.transforms.toJSONSchema(props.output);
|
|
375
375
|
} catch (e7) {
|
|
376
376
|
this.output = _zui.transforms.toJSONSchemaLegacy(props.output);
|
|
377
377
|
}
|
|
378
|
-
} else if (
|
|
378
|
+
} else if (_chunkNWTG73QRcjs.isJsonSchema.call(void 0, props.output)) {
|
|
379
379
|
this.output = props.output;
|
|
380
380
|
} else {
|
|
381
381
|
throw new Error(
|
|
@@ -384,7 +384,7 @@ var Tool = (_class = class _Tool {
|
|
|
384
384
|
}
|
|
385
385
|
}
|
|
386
386
|
this.name = props.name;
|
|
387
|
-
this.aliases =
|
|
387
|
+
this.aliases = _chunkHC2QZTVTcjs.uniq_default.call(void 0, [props.name, ..._nullishCoalesce(props.aliases, () => ( []))]);
|
|
388
388
|
this.description = props.description;
|
|
389
389
|
this.metadata = _nullishCoalesce(props.metadata, () => ( {}));
|
|
390
390
|
this._handler = props.handler;
|
|
@@ -495,14 +495,14 @@ var Tool = (_class = class _Tool {
|
|
|
495
495
|
output = _zui.transforms.fromJSONSchemaLegacy(this.output);
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
|
-
if (input && _zui.z.is.zuiObject(input.naked()) && typeof this._staticInputValues === "object" && !
|
|
499
|
-
const inputExtensions =
|
|
498
|
+
if (input && _zui.z.is.zuiObject(input.naked()) && typeof this._staticInputValues === "object" && !_chunkHC2QZTVTcjs.isEmpty_default.call(void 0, this._staticInputValues)) {
|
|
499
|
+
const inputExtensions = _chunkNWTG73QRcjs.convertObjectToZuiLiterals.call(void 0, this._staticInputValues);
|
|
500
500
|
input = input.extend(inputExtensions);
|
|
501
501
|
} else if (this._staticInputValues !== void 0) {
|
|
502
|
-
input =
|
|
502
|
+
input = _chunkNWTG73QRcjs.convertObjectToZuiLiterals.call(void 0, this._staticInputValues);
|
|
503
503
|
}
|
|
504
504
|
const fnType = _zui.z.function(input, _zui.z.promise(output)).title(this.name).describe(_nullishCoalesce(this.description, () => ( "")));
|
|
505
|
-
return
|
|
505
|
+
return _chunk73XYX76Scjs.getTypings.call(void 0, fnType, {
|
|
506
506
|
declaration: true
|
|
507
507
|
});
|
|
508
508
|
}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
isPlainObject_default,
|
|
5
5
|
pickBy_default,
|
|
6
6
|
startCase_default
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-34GJUS6U.js";
|
|
8
8
|
|
|
9
9
|
// src/utils.ts
|
|
10
10
|
import { getWasmTokenizer } from "@bpinternal/thicktoken";
|
|
@@ -205,6 +205,7 @@ function isValidMessageName(name) {
|
|
|
205
205
|
}
|
|
206
206
|
return /^[A-Z]{1,50}$/i.test(name);
|
|
207
207
|
}
|
|
208
|
+
var getErrorMessage = (err) => err instanceof Error ? err.message : JSON.stringify(err);
|
|
208
209
|
|
|
209
210
|
export {
|
|
210
211
|
init,
|
|
@@ -223,5 +224,6 @@ export {
|
|
|
223
224
|
isZuiSchema,
|
|
224
225
|
isJsonSchema,
|
|
225
226
|
isValidIdentifier,
|
|
226
|
-
isValidMessageName
|
|
227
|
+
isValidMessageName,
|
|
228
|
+
getErrorMessage
|
|
227
229
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
getTypings
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-NPVV3PHY.js";
|
|
4
4
|
import {
|
|
5
5
|
convertObjectToZuiLiterals,
|
|
6
6
|
isJsonSchema,
|
|
7
7
|
isValidIdentifier,
|
|
8
8
|
isZuiSchema
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5MAFEI2A.js";
|
|
10
10
|
import {
|
|
11
11
|
isEmpty_default,
|
|
12
12
|
uniq_default
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-34GJUS6U.js";
|
|
14
14
|
|
|
15
15
|
// src/tool.ts
|
|
16
16
|
import { z, transforms } from "@bpinternal/zui";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkHC2QZTVTcjs = require('./chunk-HC2QZTVT.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:
|
|
16
|
+
type: _chunkHC2QZTVTcjs.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:
|
|
18
|
+
props: _chunkHC2QZTVTcjs.isPlainObject_default.call(void 0, props.props) ? props.props : {}
|
|
19
19
|
});
|
|
20
20
|
var Jsx = _zui.z.custom(
|
|
21
21
|
(value) => isAnyJsxComponent(value),
|
|
@@ -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
|
|
3
|
+
var _chunkNWTG73QRcjs = require('./chunk-NWTG73QR.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 =
|
|
28
|
+
const tokenizer = _chunkNWTG73QRcjs.getTokenizer.call(void 0, );
|
|
29
29
|
const parts = [];
|
|
30
30
|
for (const msg of messages) {
|
|
31
31
|
const current = [];
|
|
@@ -5,7 +5,7 @@ var _chunkPK72FAKDcjs = require('./chunk-PK72FAKD.cjs');
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkNWTG73QRcjs = require('./chunk-NWTG73QR.cjs');
|
|
9
9
|
|
|
10
10
|
// src/typings.ts
|
|
11
11
|
var _zui = require('@bpinternal/zui');
|
|
@@ -111,7 +111,7 @@ async function sUnwrapZod(schema, options) {
|
|
|
111
111
|
parent: schema
|
|
112
112
|
};
|
|
113
113
|
if (schema instanceof Declaration) {
|
|
114
|
-
const description =
|
|
114
|
+
const description = _chunkNWTG73QRcjs.getMultilineComment.call(void 0, schema.schema.description);
|
|
115
115
|
const withoutDesc = schema.schema.describe("");
|
|
116
116
|
const typings = await sUnwrapZodRecursive(withoutDesc, { ...newOptions, declaration: true });
|
|
117
117
|
const isLargeDeclaration = typings.split("\n").length >= LARGE_DECLARATION_LINES;
|
|
@@ -132,7 +132,7 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
|
|
|
132
132
|
const optionalToken = schema.key.endsWith("?") ? "" : "?";
|
|
133
133
|
return sUnwrapZodRecursive(new KeyValue(schema.key + optionalToken, innerType), newOptions);
|
|
134
134
|
}
|
|
135
|
-
const description =
|
|
135
|
+
const description = _chunkNWTG73QRcjs.getMultilineComment.call(void 0, schema.value._def.description || schema.value.description);
|
|
136
136
|
const delimiter = (description == null ? void 0 : description.trim().length) > 0 ? "\n" : "";
|
|
137
137
|
const withoutDesc = schema.value.describe("");
|
|
138
138
|
return `${delimiter}${description}${delimiter}${schema.key}: ${await sUnwrapZodRecursive(withoutDesc, newOptions)}${delimiter}`;
|
|
@@ -143,7 +143,7 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
|
|
|
143
143
|
for (let i = 0; i < schema.schema.items.length; i++) {
|
|
144
144
|
const argName = _nullishCoalesce(((_b = (_a = schema.schema.items[i]) == null ? void 0 : _a.ui) == null ? void 0 : _b.title), () => ( `arg${i}`));
|
|
145
145
|
const item = schema.schema.items[i];
|
|
146
|
-
args += `${await sUnwrapZodRecursive(new KeyValue(
|
|
146
|
+
args += `${await sUnwrapZodRecursive(new KeyValue(_chunkNWTG73QRcjs.toPropertyKey.call(void 0, argName), item), newOptions)}, `;
|
|
147
147
|
}
|
|
148
148
|
return args;
|
|
149
149
|
}
|
|
@@ -182,7 +182,7 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
|
|
|
182
182
|
return `Promise<${await sUnwrapZodRecursive(schema.unwrap(), newOptions)}>`;
|
|
183
183
|
}
|
|
184
184
|
if (_zui.z.is.zuiFunction(schema)) {
|
|
185
|
-
const description =
|
|
185
|
+
const description = _chunkNWTG73QRcjs.getMultilineComment.call(void 0, schema._def.description);
|
|
186
186
|
const input = await sUnwrapZodRecursive(new FnParameters(schema._def.args), newOptions);
|
|
187
187
|
const output = await sUnwrapZodRecursive(new FnReturn(schema._def.returns), newOptions);
|
|
188
188
|
if (options == null ? void 0 : options.declaration) {
|
|
@@ -200,7 +200,7 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
|
|
|
200
200
|
return `Array<${item}>`;
|
|
201
201
|
}
|
|
202
202
|
if (_zui.z.is.zuiEnum(schema)) {
|
|
203
|
-
const values = schema._def.values.map(
|
|
203
|
+
const values = schema._def.values.map(_chunkNWTG73QRcjs.escapeString);
|
|
204
204
|
return values.join(" | ");
|
|
205
205
|
}
|
|
206
206
|
if (_zui.z.is.zuiTuple(schema)) {
|
|
@@ -225,7 +225,7 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
|
|
|
225
225
|
const props = await Promise.all(
|
|
226
226
|
Object.entries(schema.shape).map(async ([key, value]) => {
|
|
227
227
|
if (_zui.z.is.zuiType(value)) {
|
|
228
|
-
return sUnwrapZodRecursive(new KeyValue(
|
|
228
|
+
return sUnwrapZodRecursive(new KeyValue(_chunkNWTG73QRcjs.toPropertyKey.call(void 0, key), value), newOptions);
|
|
229
229
|
}
|
|
230
230
|
return `${key}: unknown`;
|
|
231
231
|
})
|
|
@@ -233,11 +233,11 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
|
|
|
233
233
|
return `{ ${props.join("; ")} }`;
|
|
234
234
|
}
|
|
235
235
|
if (_zui.z.is.zuiString(schema)) {
|
|
236
|
-
const description =
|
|
236
|
+
const description = _chunkNWTG73QRcjs.getMultilineComment.call(void 0, schema._def.description);
|
|
237
237
|
return `${description} string`.trim();
|
|
238
238
|
}
|
|
239
239
|
if (_zui.z.is.zuiUnion(schema)) {
|
|
240
|
-
const description =
|
|
240
|
+
const description = _chunkNWTG73QRcjs.getMultilineComment.call(void 0, schema._def.description);
|
|
241
241
|
const options2 = await Promise.all(
|
|
242
242
|
schema.options.map(async (option) => {
|
|
243
243
|
return sUnwrapZodRecursive(option, newOptions);
|
|
@@ -247,16 +247,16 @@ declare const ${schema.identifier}: ${typings};${closingTag}`);
|
|
|
247
247
|
${options2.join(" | ")}`;
|
|
248
248
|
}
|
|
249
249
|
if (_zui.z.is.zuiLiteral(schema)) {
|
|
250
|
-
const description =
|
|
250
|
+
const description = _chunkNWTG73QRcjs.getMultilineComment.call(void 0, schema._def.description);
|
|
251
251
|
return `${description}
|
|
252
|
-
${typeof schema.value === "string" ?
|
|
252
|
+
${typeof schema.value === "string" ? _chunkNWTG73QRcjs.escapeString.call(void 0, schema.value) : String(schema.value)}`.trim();
|
|
253
253
|
}
|
|
254
254
|
if (_zui.z.is.zuiNumber(schema)) {
|
|
255
|
-
const description =
|
|
255
|
+
const description = _chunkNWTG73QRcjs.getMultilineComment.call(void 0, schema._def.description);
|
|
256
256
|
return `${description} number`.trim();
|
|
257
257
|
}
|
|
258
258
|
if (_zui.z.is.zuiBoolean(schema)) {
|
|
259
|
-
const description =
|
|
259
|
+
const description = _chunkNWTG73QRcjs.getMultilineComment.call(void 0, schema._def.description);
|
|
260
260
|
return `${description} boolean`.trim();
|
|
261
261
|
}
|
|
262
262
|
if (_zui.z.is.zuiCatch(schema)) {
|
|
@@ -266,7 +266,7 @@ ${typeof schema.value === "string" ? _chunkFQ4QCUTIcjs.escapeString.call(void 0,
|
|
|
266
266
|
return sUnwrapZodRecursive(schema._def.getter(), newOptions);
|
|
267
267
|
}
|
|
268
268
|
if (_zui.z.is.zuiRecord(schema)) {
|
|
269
|
-
const description =
|
|
269
|
+
const description = _chunkNWTG73QRcjs.getMultilineComment.call(void 0, schema._def.description);
|
|
270
270
|
const keyType = await sUnwrapZodRecursive(schema._def.keyType, newOptions);
|
|
271
271
|
const valueType = await sUnwrapZodRecursive(schema._def.valueType, newOptions);
|
|
272
272
|
return `${description} { [key: (${keyType})]: (${valueType}) }`;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _chunk5ZF6NTYIcjs = require('./chunk-5ZF6NTYI.cjs');
|
|
6
6
|
|
|
7
7
|
// src/component.ts
|
|
8
8
|
var _zui = require('@bpinternal/zui');
|
|
@@ -136,14 +136,14 @@ var Component = class {
|
|
|
136
136
|
this.definition = definition;
|
|
137
137
|
}
|
|
138
138
|
render(props, children = []) {
|
|
139
|
-
return
|
|
139
|
+
return _chunk5ZF6NTYIcjs.createJsxComponent.call(void 0, { type: this.definition.name, props, children });
|
|
140
140
|
}
|
|
141
141
|
};
|
|
142
142
|
function isComponent(rendered, component) {
|
|
143
|
-
return
|
|
143
|
+
return _chunk5ZF6NTYIcjs.isJsxComponent.call(void 0, component.definition.name, rendered);
|
|
144
144
|
}
|
|
145
145
|
function isAnyComponent(message) {
|
|
146
|
-
return
|
|
146
|
+
return _chunk5ZF6NTYIcjs.isAnyJsxComponent.call(void 0, message);
|
|
147
147
|
}
|
|
148
148
|
function renderToTsx(component) {
|
|
149
149
|
const props = Object.entries(component.props).map(([key, value]) => {
|
|
@@ -10,14 +10,14 @@ import {
|
|
|
10
10
|
} from "./chunk-YEAWWJSJ.js";
|
|
11
11
|
import {
|
|
12
12
|
createJsxComponent
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-XTEHT2TK.js";
|
|
14
14
|
import {
|
|
15
15
|
__commonJS,
|
|
16
16
|
__toESM,
|
|
17
17
|
isFunction_default,
|
|
18
18
|
mapValues_default,
|
|
19
19
|
maxBy_default
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-34GJUS6U.js";
|
|
21
21
|
|
|
22
22
|
// ../../node_modules/.pnpm/source-map-js@1.2.1_patch_hash=0354139cbc5dbd66e1bc59167ff8e42d3a9a2169038a35f1b7b1b4b843e08a6c/node_modules/source-map-js/lib/base64.js
|
|
23
23
|
var require_base64 = __commonJS({
|