@mastra/playground-ui 5.1.16-alpha.0 → 5.1.16-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 +48 -30
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +48 -30
- package/dist/index.es.js.map +1 -1
- package/dist/src/components/ui/playground-tabs.d.ts +4 -2
- package/package.json +3 -3
package/dist/index.cjs.js
CHANGED
|
@@ -6067,7 +6067,8 @@ const PlaygroundTabs = ({
|
|
|
6067
6067
|
children,
|
|
6068
6068
|
defaultTab,
|
|
6069
6069
|
value,
|
|
6070
|
-
onValueChange
|
|
6070
|
+
onValueChange,
|
|
6071
|
+
className
|
|
6071
6072
|
}) => {
|
|
6072
6073
|
const [internalTab, setInternalTab] = React.useState(defaultTab);
|
|
6073
6074
|
const isControlled = value !== void 0 && onValueChange !== void 0;
|
|
@@ -6080,10 +6081,10 @@ const PlaygroundTabs = ({
|
|
|
6080
6081
|
setInternalTab(typedValue);
|
|
6081
6082
|
}
|
|
6082
6083
|
};
|
|
6083
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Tabs, { value: currentTab, onValueChange: handleTabChange, className: "h-full", children });
|
|
6084
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Tabs, { value: currentTab, onValueChange: handleTabChange, className: cn("h-full", className), children });
|
|
6084
6085
|
};
|
|
6085
|
-
const TabList = ({ children }) => {
|
|
6086
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full overflow-x-auto", children: /* @__PURE__ */ jsxRuntime.jsx(TabsList, { className: "border-b
|
|
6086
|
+
const TabList = ({ children, className }) => {
|
|
6087
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("w-full overflow-x-auto", className), children: /* @__PURE__ */ jsxRuntime.jsx(TabsList, { className: "border-b border-border1 flex min-w-full shrink-0", children }) });
|
|
6087
6088
|
};
|
|
6088
6089
|
const Tab = ({ children, value, onClick }) => {
|
|
6089
6090
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7877,7 +7878,7 @@ const AgentMetadataPrompt = ({ prompt }) => {
|
|
|
7877
7878
|
};
|
|
7878
7879
|
|
|
7879
7880
|
const EntityHeader = ({ icon, title, isLoading, children }) => {
|
|
7880
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5", children: [
|
|
7881
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-5 w-full overflow-x-hidden", children: [
|
|
7881
7882
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-icon6 flex items-center gap-2", children: [
|
|
7882
7883
|
/* @__PURE__ */ jsxRuntime.jsx(Icon, { size: "lg", className: "bg-surface4 rounded-md p-1", children: icon }),
|
|
7883
7884
|
isLoading ? /* @__PURE__ */ jsxRuntime.jsx(Skeleton, { className: "h-3 w-1/3" }) : /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex min-w-0 items-center gap-4", children: /* @__PURE__ */ jsxRuntime.jsx(Txt, { variant: "header-md", as: "h2", className: "truncate font-medium", children: title }) })
|
|
@@ -12462,7 +12463,7 @@ function DynamicForm({
|
|
|
12462
12463
|
},
|
|
12463
12464
|
defaultValues: isNotZodObject ? defaultValues ? { "": defaultValues } : void 0 : defaultValues,
|
|
12464
12465
|
formProps: {
|
|
12465
|
-
className
|
|
12466
|
+
className
|
|
12466
12467
|
},
|
|
12467
12468
|
uiComponents: {
|
|
12468
12469
|
SubmitButton: ({ children }) => onSubmit ? /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "light", className: "w-full", size: "lg", disabled: isSubmitLoading, children: isSubmitLoading ? /* @__PURE__ */ jsxRuntime.jsx(Icon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "animate-spin" }) }) : submitButtonLabel || children }) : null
|
|
@@ -12741,33 +12742,50 @@ const WorkflowInputData = ({
|
|
|
12741
12742
|
}) => {
|
|
12742
12743
|
const [type, setType] = React.useState("form");
|
|
12743
12744
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
12744
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12745
|
-
|
|
12746
|
-
/* @__PURE__ */ jsxRuntime.jsx(RadioGroupItem, { value: "form", id: "form" }),
|
|
12747
|
-
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "form", className: "!text-icon3 text-ui-sm", children: "Form" })
|
|
12748
|
-
] }),
|
|
12749
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
12750
|
-
/* @__PURE__ */ jsxRuntime.jsx(RadioGroupItem, { value: "json", id: "json" }),
|
|
12751
|
-
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "json", className: "!text-icon3 text-ui-sm", children: "JSON" })
|
|
12752
|
-
] })
|
|
12753
|
-
] }) }),
|
|
12754
|
-
type === "form" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
12755
|
-
DynamicForm,
|
|
12745
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12746
|
+
RadioGroup,
|
|
12756
12747
|
{
|
|
12757
|
-
|
|
12758
|
-
|
|
12759
|
-
|
|
12760
|
-
|
|
12761
|
-
|
|
12748
|
+
disabled: isSubmitLoading,
|
|
12749
|
+
value: type,
|
|
12750
|
+
onValueChange: (value) => setType(value),
|
|
12751
|
+
className: "pb-4",
|
|
12752
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-row gap-4", children: [
|
|
12753
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
12754
|
+
/* @__PURE__ */ jsxRuntime.jsx(RadioGroupItem, { value: "form", id: "form" }),
|
|
12755
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "form", className: "!text-icon3 text-ui-sm", children: "Form" })
|
|
12756
|
+
] }),
|
|
12757
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
12758
|
+
/* @__PURE__ */ jsxRuntime.jsx(RadioGroupItem, { value: "json", id: "json" }),
|
|
12759
|
+
/* @__PURE__ */ jsxRuntime.jsx(Label, { htmlFor: "json", className: "!text-icon3 text-ui-sm", children: "JSON" })
|
|
12760
|
+
] })
|
|
12761
|
+
] })
|
|
12762
12762
|
}
|
|
12763
|
-
)
|
|
12764
|
-
|
|
12763
|
+
),
|
|
12764
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
12765
|
+
"div",
|
|
12765
12766
|
{
|
|
12766
|
-
|
|
12767
|
-
|
|
12768
|
-
|
|
12769
|
-
|
|
12770
|
-
|
|
12767
|
+
className: cn({
|
|
12768
|
+
"opacity-50 pointer-events-none": isSubmitLoading
|
|
12769
|
+
}),
|
|
12770
|
+
children: type === "form" ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
12771
|
+
DynamicForm,
|
|
12772
|
+
{
|
|
12773
|
+
schema,
|
|
12774
|
+
defaultValues,
|
|
12775
|
+
isSubmitLoading,
|
|
12776
|
+
submitButtonLabel,
|
|
12777
|
+
onSubmit
|
|
12778
|
+
}
|
|
12779
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
12780
|
+
JSONInput,
|
|
12781
|
+
{
|
|
12782
|
+
schema,
|
|
12783
|
+
defaultValues,
|
|
12784
|
+
isSubmitLoading,
|
|
12785
|
+
submitButtonLabel,
|
|
12786
|
+
onSubmit
|
|
12787
|
+
}
|
|
12788
|
+
)
|
|
12771
12789
|
}
|
|
12772
12790
|
)
|
|
12773
12791
|
] });
|