@mastra/playground-ui 4.0.2-alpha.0 → 4.0.3-alpha.0

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.es.js CHANGED
@@ -7663,33 +7663,10 @@ function WorkflowTrigger({
7663
7663
  ] }) });
7664
7664
  }
7665
7665
  if (!workflow) return null;
7666
- if (!triggerSchema) {
7667
- return /* @__PURE__ */ jsx(ScrollArea, { className: "h-[calc(100vh-126px)] pt-2 px-4 pb-4 text-xs w-full", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
7668
- /* @__PURE__ */ jsx("div", { className: "px-4 space-y-4", children: /* @__PURE__ */ jsx(Button, { className: "w-full", disabled: isRunning, onClick: () => handleExecuteWorkflow(null), children: isRunning ? /* @__PURE__ */ jsx(Loader2, { className: "w-4 h-4 animate-spin" }) : "Trigger" }) }),
7669
- /* @__PURE__ */ jsxs("div", { className: "group relative flex flex-col", children: [
7670
- /* @__PURE__ */ jsx(Text, { variant: "secondary", className: "px-4 text-mastra-el-3", size: "xs", children: "Output" }),
7671
- /* @__PURE__ */ jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ jsx(
7672
- CopyButton,
7673
- {
7674
- classname: "absolute z-40 w-8 h-8 p-0 transition-opacity duration-150 ease-in-out opacity-0 top-4 right-4 group-hover:opacity-100",
7675
- content: JSON.stringify(result ?? {}, null, 2)
7676
- }
7677
- ) }),
7678
- /* @__PURE__ */ jsx(
7679
- CodeBlockDemo,
7680
- {
7681
- className: "w-full overflow-x-auto",
7682
- code: result?.sanitizedOutput || JSON.stringify(result ?? {}, null, 2),
7683
- language: "json"
7684
- }
7685
- )
7686
- ] })
7687
- ] }) });
7688
- }
7689
- const zodInputSchema = resolveSerializedZodOutput(jsonSchemaToZod(parse(triggerSchema)));
7690
7666
  const isSuspendedSteps = suspendedSteps.length > 0;
7667
+ const zodInputSchema = triggerSchema ? resolveSerializedZodOutput(jsonSchemaToZod(parse(triggerSchema))) : null;
7691
7668
  return /* @__PURE__ */ jsx(ScrollArea, { className: "h-[calc(100vh-126px)] pt-2 px-4 pb-4 text-xs w-full", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
7692
- !isSuspendedSteps && /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
7669
+ !isSuspendedSteps && /* @__PURE__ */ jsx(Fragment, { children: zodInputSchema ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
7693
7670
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between w-full", children: [
7694
7671
  /* @__PURE__ */ jsx(Text, { variant: "secondary", className: "px-4 text-mastra-el-3", size: "xs", children: "Input" }),
7695
7672
  isResumingWorkflow ? /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
@@ -7709,7 +7686,13 @@ function WorkflowTrigger({
7709
7686
  }
7710
7687
  }
7711
7688
  )
7712
- ] }),
7689
+ ] }) : /* @__PURE__ */ jsxs("div", { className: "px-4 space-y-4", children: [
7690
+ isResumingWorkflow ? /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1", children: [
7691
+ /* @__PURE__ */ jsx(Loader2, { className: "w-3 h-3 animate-spin text-mastra-el-accent" }),
7692
+ " Resuming workflow"
7693
+ ] }) : /* @__PURE__ */ jsx(Fragment, {}),
7694
+ /* @__PURE__ */ jsx(Button, { className: "w-full", disabled: isRunning, onClick: () => handleExecuteWorkflow(null), children: isRunning ? /* @__PURE__ */ jsx(Loader2, { className: "w-4 h-4 animate-spin" }) : "Trigger" })
7695
+ ] }) }),
7713
7696
  Object.values(workflowActivePaths).length > 0 && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
7714
7697
  /* @__PURE__ */ jsx(Text, { variant: "secondary", className: "px-4 text-mastra-el-3", size: "xs", children: "Status" }),
7715
7698
  /* @__PURE__ */ jsx("div", { className: "px-4 flex flex-col gap-4", children: Object.entries(workflowActivePaths)?.map(([stepId, { status: pathStatus, stepPath }]) => {