@mastra/playground-ui 5.1.6 → 5.1.7-alpha.1
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.cjs.js +19 -7
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +19 -7
- package/dist/index.es.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -9119,6 +9119,7 @@ function DynamicForm({
|
|
|
9119
9119
|
className,
|
|
9120
9120
|
readOnly
|
|
9121
9121
|
}) {
|
|
9122
|
+
const isNotZodObject = !(schema instanceof z.ZodObject);
|
|
9122
9123
|
if (!schema) {
|
|
9123
9124
|
console.error("no form schema found");
|
|
9124
9125
|
return null;
|
|
@@ -9127,17 +9128,20 @@ function DynamicForm({
|
|
|
9127
9128
|
if (isEmptyZodObject(schema2)) {
|
|
9128
9129
|
return z.object({});
|
|
9129
9130
|
}
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9131
|
+
if (isNotZodObject) {
|
|
9132
|
+
return z.object({
|
|
9133
|
+
"": schema2
|
|
9134
|
+
});
|
|
9135
|
+
}
|
|
9136
|
+
return schema2;
|
|
9133
9137
|
};
|
|
9134
9138
|
const schemaProvider = new CustomZodProvider(normalizedSchema(schema));
|
|
9135
9139
|
const formProps = {
|
|
9136
9140
|
schema: schemaProvider,
|
|
9137
9141
|
onSubmit: async (values) => {
|
|
9138
|
-
await onSubmit?.(values
|
|
9142
|
+
await onSubmit?.(isNotZodObject ? values[""] || {} : values);
|
|
9139
9143
|
},
|
|
9140
|
-
defaultValues: defaultValues ? { "": defaultValues } : void 0,
|
|
9144
|
+
defaultValues: isNotZodObject ? defaultValues ? { "": defaultValues } : void 0 : defaultValues,
|
|
9141
9145
|
formProps: {
|
|
9142
9146
|
className: ""
|
|
9143
9147
|
},
|
|
@@ -9775,7 +9779,7 @@ function WorkflowTrigger({
|
|
|
9775
9779
|
const { sanitizedOutput, ...restResult } = result || {};
|
|
9776
9780
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "h-full pt-3 pb-12", children: [
|
|
9777
9781
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-4 px-5 pb-5 border-b-sm border-border1", children: [
|
|
9778
|
-
isResumingWorkflow && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-2 px-5 flex items-center gap-2 bg-surface5 -mx-5 -mt-5 border-b-sm border-border1", children: [
|
|
9782
|
+
(isResumingWorkflow || isSuspendedSteps && isWatchingWorkflow) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "py-2 px-5 flex items-center gap-2 bg-surface5 -mx-5 -mt-5 border-b-sm border-border1", children: [
|
|
9779
9783
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "animate-spin text-icon6" }) }),
|
|
9780
9784
|
/* @__PURE__ */ jsxRuntime.jsx(Txt, { children: "Resuming workflow" })
|
|
9781
9785
|
] }),
|
|
@@ -9874,7 +9878,15 @@ const WorkflowResultFinishedStep = ({ stepResult, stepDefinition }) => {
|
|
|
9874
9878
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Footprints, { className: "text-icon3" }) }),
|
|
9875
9879
|
/* @__PURE__ */ jsxRuntime.jsx(Txt, { variant: "ui-sm", className: "text-icon3", children: stepDefinition.description || stepDefinition.id })
|
|
9876
9880
|
] }),
|
|
9877
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9881
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9882
|
+
DynamicForm,
|
|
9883
|
+
{
|
|
9884
|
+
schema: zodObjectSchema,
|
|
9885
|
+
defaultValues: stepResult,
|
|
9886
|
+
readOnly: true
|
|
9887
|
+
},
|
|
9888
|
+
JSON.stringify(stepResult)
|
|
9889
|
+
)
|
|
9878
9890
|
] });
|
|
9879
9891
|
} catch (err) {
|
|
9880
9892
|
console.error("Error parsing output schema", err);
|