@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.es.js
CHANGED
|
@@ -9087,6 +9087,7 @@ function DynamicForm({
|
|
|
9087
9087
|
className,
|
|
9088
9088
|
readOnly
|
|
9089
9089
|
}) {
|
|
9090
|
+
const isNotZodObject = !(schema instanceof ZodObject);
|
|
9090
9091
|
if (!schema) {
|
|
9091
9092
|
console.error("no form schema found");
|
|
9092
9093
|
return null;
|
|
@@ -9095,17 +9096,20 @@ function DynamicForm({
|
|
|
9095
9096
|
if (isEmptyZodObject(schema2)) {
|
|
9096
9097
|
return z$1.object({});
|
|
9097
9098
|
}
|
|
9098
|
-
|
|
9099
|
-
|
|
9100
|
-
|
|
9099
|
+
if (isNotZodObject) {
|
|
9100
|
+
return z$1.object({
|
|
9101
|
+
"": schema2
|
|
9102
|
+
});
|
|
9103
|
+
}
|
|
9104
|
+
return schema2;
|
|
9101
9105
|
};
|
|
9102
9106
|
const schemaProvider = new CustomZodProvider(normalizedSchema(schema));
|
|
9103
9107
|
const formProps = {
|
|
9104
9108
|
schema: schemaProvider,
|
|
9105
9109
|
onSubmit: async (values) => {
|
|
9106
|
-
await onSubmit?.(values
|
|
9110
|
+
await onSubmit?.(isNotZodObject ? values[""] || {} : values);
|
|
9107
9111
|
},
|
|
9108
|
-
defaultValues: defaultValues ? { "": defaultValues } : void 0,
|
|
9112
|
+
defaultValues: isNotZodObject ? defaultValues ? { "": defaultValues } : void 0 : defaultValues,
|
|
9109
9113
|
formProps: {
|
|
9110
9114
|
className: ""
|
|
9111
9115
|
},
|
|
@@ -9743,7 +9747,7 @@ function WorkflowTrigger({
|
|
|
9743
9747
|
const { sanitizedOutput, ...restResult } = result || {};
|
|
9744
9748
|
return /* @__PURE__ */ jsxs("div", { className: "h-full pt-3 pb-12", children: [
|
|
9745
9749
|
/* @__PURE__ */ jsxs("div", { className: "space-y-4 px-5 pb-5 border-b-sm border-border1", children: [
|
|
9746
|
-
isResumingWorkflow && /* @__PURE__ */ jsxs("div", { className: "py-2 px-5 flex items-center gap-2 bg-surface5 -mx-5 -mt-5 border-b-sm border-border1", children: [
|
|
9750
|
+
(isResumingWorkflow || isSuspendedSteps && isWatchingWorkflow) && /* @__PURE__ */ jsxs("div", { className: "py-2 px-5 flex items-center gap-2 bg-surface5 -mx-5 -mt-5 border-b-sm border-border1", children: [
|
|
9747
9751
|
/* @__PURE__ */ jsx(Icon, { children: /* @__PURE__ */ jsx(Loader2, { className: "animate-spin text-icon6" }) }),
|
|
9748
9752
|
/* @__PURE__ */ jsx(Txt, { children: "Resuming workflow" })
|
|
9749
9753
|
] }),
|
|
@@ -9842,7 +9846,15 @@ const WorkflowResultFinishedStep = ({ stepResult, stepDefinition }) => {
|
|
|
9842
9846
|
/* @__PURE__ */ jsx(Icon, { children: /* @__PURE__ */ jsx(Footprints, { className: "text-icon3" }) }),
|
|
9843
9847
|
/* @__PURE__ */ jsx(Txt, { variant: "ui-sm", className: "text-icon3", children: stepDefinition.description || stepDefinition.id })
|
|
9844
9848
|
] }),
|
|
9845
|
-
/* @__PURE__ */ jsx(
|
|
9849
|
+
/* @__PURE__ */ jsx(
|
|
9850
|
+
DynamicForm,
|
|
9851
|
+
{
|
|
9852
|
+
schema: zodObjectSchema,
|
|
9853
|
+
defaultValues: stepResult,
|
|
9854
|
+
readOnly: true
|
|
9855
|
+
},
|
|
9856
|
+
JSON.stringify(stepResult)
|
|
9857
|
+
)
|
|
9846
9858
|
] });
|
|
9847
9859
|
} catch (err) {
|
|
9848
9860
|
console.error("Error parsing output schema", err);
|