@mastra/playground-ui 20.0.1-alpha.0 → 20.0.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/CHANGELOG.md +45 -0
- package/dist/index.cjs.js +18 -20
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.css +1 -22
- package/dist/index.es.js +18 -20
- package/dist/index.es.js.map +1 -1
- package/dist/src/ds/components/Tabs/tabs-list.d.ts +1 -2
- package/dist/src/ds/components/Tabs/tabs.stories.d.ts +0 -1
- package/package.json +7 -7
package/dist/index.css
CHANGED
|
@@ -1625,10 +1625,6 @@
|
|
|
1625
1625
|
min-height: var(--spacing-12);
|
|
1626
1626
|
}
|
|
1627
1627
|
|
|
1628
|
-
.min-h-\[2\.5rem\] {
|
|
1629
|
-
min-height: 2.5rem;
|
|
1630
|
-
}
|
|
1631
|
-
|
|
1632
1628
|
.min-h-\[5\.5rem\] {
|
|
1633
1629
|
min-height: 5.5rem;
|
|
1634
1630
|
}
|
|
@@ -8413,10 +8409,6 @@
|
|
|
8413
8409
|
padding-inline: var(--spacing-2);
|
|
8414
8410
|
}
|
|
8415
8411
|
|
|
8416
|
-
.\[\&\>button\]\:px-4 > button {
|
|
8417
|
-
padding-inline: var(--spacing-4);
|
|
8418
|
-
}
|
|
8419
|
-
|
|
8420
8412
|
.\[\&\>button\]\:px-6 > button {
|
|
8421
8413
|
padding-inline: var(--spacing-6);
|
|
8422
8414
|
}
|
|
@@ -8445,11 +8437,7 @@
|
|
|
8445
8437
|
}
|
|
8446
8438
|
|
|
8447
8439
|
@media (hover: hover) {
|
|
8448
|
-
|
|
8449
|
-
background-color: var(--color-surface3);
|
|
8450
|
-
}
|
|
8451
|
-
|
|
8452
|
-
.\[\&\>button\]\:hover\:text-neutral4 > button:hover, .hover\:\[\&\>button\]\:text-neutral4:hover > button {
|
|
8440
|
+
.\[\&\>button\]\:hover\:text-neutral4 > button:hover {
|
|
8453
8441
|
color: var(--color-neutral4);
|
|
8454
8442
|
}
|
|
8455
8443
|
}
|
|
@@ -8487,19 +8475,10 @@
|
|
|
8487
8475
|
}
|
|
8488
8476
|
}
|
|
8489
8477
|
|
|
8490
|
-
.\[\&\>button\[data-state\=active\]\]\:bg-surface4 > button[data-state="active"] {
|
|
8491
|
-
background-color: var(--color-surface4);
|
|
8492
|
-
}
|
|
8493
|
-
|
|
8494
8478
|
.\[\&\>button\[data-state\=active\]\]\:text-neutral5 > button[data-state="active"] {
|
|
8495
8479
|
color: var(--color-neutral5);
|
|
8496
8480
|
}
|
|
8497
8481
|
|
|
8498
|
-
.\[\&\>button\[data-state\=active\]\]\:shadow-inner > button[data-state="active"] {
|
|
8499
|
-
--tw-shadow: inset 0 2px 4px var(--tw-shadow-color, #0000004d);
|
|
8500
|
-
box-shadow: var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
|
|
8501
|
-
}
|
|
8502
|
-
|
|
8503
8482
|
.\[\&\>button\[data-state\=active\]\]\:dark\:border-white\/50 > button[data-state="active"]:is(.dark *) {
|
|
8504
8483
|
border-color: #ffffff80;
|
|
8505
8484
|
}
|
package/dist/index.es.js
CHANGED
|
@@ -9163,12 +9163,17 @@ const CustomAutoFormField = ({ field, path }) => {
|
|
|
9163
9163
|
const { formComponents, uiComponents } = useAutoForm();
|
|
9164
9164
|
const {
|
|
9165
9165
|
register,
|
|
9166
|
-
formState: { errors },
|
|
9166
|
+
formState: { errors, defaultValues },
|
|
9167
9167
|
getValues
|
|
9168
9168
|
} = useFormContext();
|
|
9169
9169
|
const fullPath = path.join(".");
|
|
9170
9170
|
const error = getPathInObject(errors, path)?.message;
|
|
9171
9171
|
const value = getValues(fullPath);
|
|
9172
|
+
const fieldDefault = useMemo(() => {
|
|
9173
|
+
if (!defaultValues) return field.default;
|
|
9174
|
+
const resolved = getPathInObject(defaultValues, path);
|
|
9175
|
+
return resolved === void 0 ? field.default : resolved;
|
|
9176
|
+
}, [defaultValues, path, field.default]);
|
|
9172
9177
|
const FieldWrapper = field.fieldConfig?.fieldWrapper || uiComponents.FieldWrapper;
|
|
9173
9178
|
let FieldComponent = () => /* @__PURE__ */ jsx(
|
|
9174
9179
|
uiComponents.ErrorMessage,
|
|
@@ -9185,11 +9190,12 @@ const CustomAutoFormField = ({ field, path }) => {
|
|
|
9185
9190
|
} else if ("fallback" in formComponents) {
|
|
9186
9191
|
FieldComponent = formComponents.fallback;
|
|
9187
9192
|
}
|
|
9188
|
-
|
|
9193
|
+
const fieldWithDefault = { ...field, default: fieldDefault };
|
|
9194
|
+
return /* @__PURE__ */ jsx(FieldWrapper, { label: getLabel(field), error, id: fullPath, field: fieldWithDefault, children: /* @__PURE__ */ jsx(
|
|
9189
9195
|
FieldComponent,
|
|
9190
9196
|
{
|
|
9191
9197
|
label: getLabel(field),
|
|
9192
|
-
field,
|
|
9198
|
+
field: fieldWithDefault,
|
|
9193
9199
|
value,
|
|
9194
9200
|
error,
|
|
9195
9201
|
id: fullPath,
|
|
@@ -10673,7 +10679,7 @@ const WorkflowStepActionBar = ({
|
|
|
10673
10679
|
}
|
|
10674
10680
|
return void 0;
|
|
10675
10681
|
}, [stepKey, stepsFlow, inDebugMode, result]);
|
|
10676
|
-
const showDebugMode = inDebugMode && stepPayload && !result?.steps[stepKey];
|
|
10682
|
+
const showDebugMode = inDebugMode && stepPayload && !result?.steps?.[stepKey];
|
|
10677
10683
|
const isMapConfigOpen = stepDetail?.type === "map-config" && stepDetail?.stepName === stepName;
|
|
10678
10684
|
const isNestedGraphOpen = stepDetail?.type === "nested-graph" && stepDetail?.stepName === stepName;
|
|
10679
10685
|
const activeButtonClass = "ring-2 ring-accent1 ring-offset-1 ring-offset-transparent";
|
|
@@ -13184,25 +13190,17 @@ const Tabs = ({ children, defaultTab, value, onValueChange, className }) => {
|
|
|
13184
13190
|
return /* @__PURE__ */ jsx(RadixTabs.Root, { value: currentTab, onValueChange: handleTabChange, className: cn("overflow-y-auto", className), children });
|
|
13185
13191
|
};
|
|
13186
13192
|
|
|
13187
|
-
const TabList = ({ children,
|
|
13193
|
+
const TabList = ({ children, alignment = "left", className }) => {
|
|
13188
13194
|
return /* @__PURE__ */ jsx("div", { className: cn("w-full overflow-x-auto", className), children: /* @__PURE__ */ jsx(
|
|
13189
13195
|
RadixTabs.List,
|
|
13190
13196
|
{
|
|
13191
13197
|
className: cn(
|
|
13192
13198
|
"flex items-center relative w-max min-w-full",
|
|
13193
|
-
|
|
13194
|
-
|
|
13195
|
-
|
|
13196
|
-
|
|
13197
|
-
|
|
13198
|
-
[`[&>button]:${transitions.colors} [&>button]:hover:text-neutral4`]: variant === "default",
|
|
13199
|
-
"[&>button[data-state=active]]:text-neutral5 [&>button[data-state=active]]:border-black/50 [&>button[data-state=active]]:dark:border-white/50": variant === "default",
|
|
13200
|
-
// variant: buttons
|
|
13201
|
-
"border border-border1 flex justify-stretch rounded-md overflow-hidden text-ui-md min-h-[2.5rem]": variant === "buttons",
|
|
13202
|
-
[`[&>button]:flex-1 [&>button]:py-2 [&>button]:px-4 [&>button]:text-neutral3 [&>button]:${transitions.all}`]: variant === "buttons",
|
|
13203
|
-
"hover:[&>button]:text-neutral4 hover:[&>button]:bg-surface3": variant === "buttons",
|
|
13204
|
-
"[&>button[data-state=active]]:text-neutral5 [&>button[data-state=active]]:bg-surface4 [&>button[data-state=active]]:shadow-inner": variant === "buttons"
|
|
13205
|
-
},
|
|
13199
|
+
"text-ui-lg border-b border-border1",
|
|
13200
|
+
"[&>button]:py-2 [&>button]:px-6 [&>button]:font-normal [&>button]:text-neutral3 [&>button]:border-b-2 [&>button]:border-transparent",
|
|
13201
|
+
alignment === "full-width" && "[&>button]:flex-1",
|
|
13202
|
+
`[&>button]:${transitions.colors} [&>button]:hover:text-neutral4`,
|
|
13203
|
+
"[&>button[data-state=active]]:text-neutral5 [&>button[data-state=active]]:border-black/50 [&>button[data-state=active]]:dark:border-white/50",
|
|
13206
13204
|
className
|
|
13207
13205
|
),
|
|
13208
13206
|
children
|
|
@@ -44551,7 +44549,7 @@ function EmptyDatasetsTable({ onCreateClick }) {
|
|
|
44551
44549
|
size: "lg",
|
|
44552
44550
|
variant: "outline",
|
|
44553
44551
|
as: "a",
|
|
44554
|
-
href: "https://mastra.ai/docs/
|
|
44552
|
+
href: "https://mastra.ai/docs/evals/datasets/overview",
|
|
44555
44553
|
target: "_blank",
|
|
44556
44554
|
rel: "noopener noreferrer",
|
|
44557
44555
|
children: [
|
|
@@ -44652,7 +44650,7 @@ const NoDatasetsInfo = () => /* @__PURE__ */ jsx("div", { className: "flex h-ful
|
|
|
44652
44650
|
{
|
|
44653
44651
|
variant: "ghost",
|
|
44654
44652
|
as: "a",
|
|
44655
|
-
href: "https://mastra.ai/docs/
|
|
44653
|
+
href: "https://mastra.ai/docs/evals/datasets/overview",
|
|
44656
44654
|
target: "_blank",
|
|
44657
44655
|
rel: "noopener noreferrer",
|
|
44658
44656
|
children: [
|