@mastra/playground-ui 5.1.7-alpha.5 → 5.1.7-alpha.6

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 CHANGED
@@ -10489,63 +10489,9 @@ function WorkflowTrigger({
10489
10489
  ] });
10490
10490
  })
10491
10491
  ] }),
10492
- result && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-5 border-b-sm border-border1", children: /* @__PURE__ */ jsxRuntime.jsx(WorkflowJsonDialog, { result: restResult }) }),
10493
- result && /* @__PURE__ */ jsxRuntime.jsx(WorkflowResultSection, { result, workflow })
10492
+ result && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-5 border-b-sm border-border1", children: /* @__PURE__ */ jsxRuntime.jsx(WorkflowJsonDialog, { result: restResult }) })
10494
10493
  ] });
10495
10494
  }
10496
- const WorkflowResultSection = ({ result, workflow }) => {
10497
- const workflowState = result.payload.workflowState;
10498
- const hasResult = Object.keys(workflowState.steps || {}).length > 0;
10499
- if (!hasResult) return null;
10500
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5", children: [
10501
- /* @__PURE__ */ jsxRuntime.jsx(Txt, { variant: "ui-sm", className: "text-icon3", children: "Final Output" }),
10502
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "pt-4", children: Object.entries(workflowState.steps || {}).map(([stepId, stepResult]) => {
10503
- const stepDefinition = workflow.steps[stepId];
10504
- if (!stepDefinition) return null;
10505
- return /* @__PURE__ */ jsxRuntime.jsx(
10506
- "li",
10507
- {
10508
- className: "border-b-sm border-dashed border-border1 last:border-b-0 py-4 first:pt-0 last:pb-0",
10509
- children: /* @__PURE__ */ jsxRuntime.jsx(WorkflowResultFinishedStep, { stepResult: stepResult.output, stepDefinition })
10510
- },
10511
- stepId
10512
- );
10513
- }) })
10514
- ] });
10515
- };
10516
- const WorkflowResultFinishedStep = ({ stepResult, stepDefinition }) => {
10517
- const id = React.useId();
10518
- try {
10519
- const zodObjectSchema = resolveSerializedZodOutput(jsonSchemaToZod(superjson.parse(stepDefinition.outputSchema)));
10520
- if (zodObjectSchema?._def?.typeName === "ZodString") {
10521
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
10522
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
10523
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Footprints, { className: "text-icon3" }) }),
10524
- /* @__PURE__ */ jsxRuntime.jsx(Txt, { as: "label", htmlFor: id, variant: "ui-sm", className: "text-icon3", children: stepDefinition.description || stepDefinition.id })
10525
- ] }),
10526
- /* @__PURE__ */ jsxRuntime.jsx(Input, { id, defaultValue: stepResult, readOnly: true })
10527
- ] });
10528
- }
10529
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
10530
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 pb-2", children: [
10531
- /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Footprints, { className: "text-icon3" }) }),
10532
- /* @__PURE__ */ jsxRuntime.jsx(Txt, { variant: "ui-sm", className: "text-icon3", children: stepDefinition.description || stepDefinition.id })
10533
- ] }),
10534
- /* @__PURE__ */ jsxRuntime.jsx(
10535
- DynamicForm,
10536
- {
10537
- schema: zodObjectSchema,
10538
- defaultValues: stepResult,
10539
- readOnly: true
10540
- },
10541
- JSON.stringify(stepResult)
10542
- )
10543
- ] });
10544
- } catch (err) {
10545
- console.error("Error parsing output schema", err);
10546
- return /* @__PURE__ */ jsxRuntime.jsx(Txt, { children: "An error occured. Please open an issue on GitHub." });
10547
- }
10548
- };
10549
10495
  const WorkflowJsonDialog = ({ result }) => {
10550
10496
  const [open, setOpen] = React.useState(false);
10551
10497
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [