@mastra/playground-ui 22.1.3-alpha.3 → 22.2.0-alpha.8

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 CHANGED
@@ -1,5 +1,58 @@
1
1
  # @mastra/playground-ui
2
2
 
3
+ ## 22.2.0-alpha.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`1bd5104`](https://github.com/mastra-ai/mastra/commit/1bd51048b6da93507276d6623e3fd96a9e1a8944)]:
8
+ - @mastra/core@1.26.0-alpha.8
9
+ - @mastra/client-js@1.13.5-alpha.8
10
+ - @mastra/react@0.2.27-alpha.8
11
+
12
+ ## 22.2.0-alpha.7
13
+
14
+ ### Minor Changes
15
+
16
+ - Added BrandLoader, a branded pulse-wave loader component for brand moments like app boot or agent thinking. Complements Spinner, which remains the inline utility loader. ([#15490](https://github.com/mastra-ai/mastra/pull/15490))
17
+
18
+ ### Patch Changes
19
+
20
+ - Updated dependencies [[`8786a61`](https://github.com/mastra-ai/mastra/commit/8786a61fa54ba265f85eeff9985ca39863d18bb6), [`8fb2405`](https://github.com/mastra-ai/mastra/commit/8fb2405138f2d208b7962ad03f121ca25bcc28c5)]:
21
+ - @mastra/core@1.26.0-alpha.7
22
+ - @mastra/client-js@1.13.5-alpha.7
23
+ - @mastra/react@0.2.27-alpha.7
24
+
25
+ ## 22.1.3-alpha.6
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies [[`6315317`](https://github.com/mastra-ai/mastra/commit/63153175fe9a7b224e5be7c209bbebc01dd9b0d5), [`9d3b24b`](https://github.com/mastra-ai/mastra/commit/9d3b24b19407ae9c09586cf7766d38dc4dff4a69)]:
30
+ - @mastra/core@1.26.0-alpha.6
31
+ - @mastra/client-js@1.13.5-alpha.6
32
+ - @mastra/react@0.2.27-alpha.6
33
+
34
+ ## 22.1.3-alpha.5
35
+
36
+ ### Patch Changes
37
+
38
+ - Added a Foundations/Tokens page to the @mastra/playground-ui Storybook so you can browse all typography, color, spacing, radius, shadow, and animation tokens in one place. ([#15475](https://github.com/mastra-ai/mastra/pull/15475))
39
+
40
+ - Added `ScoresDataList` for rendering lists of score evaluation results. ([#15339](https://github.com/mastra-ai/mastra/pull/15339))
41
+
42
+ - Updated dependencies [[`92dcf02`](https://github.com/mastra-ai/mastra/commit/92dcf029294210ac91b090900c1a0555a425c57a)]:
43
+ - @mastra/core@1.26.0-alpha.5
44
+ - @mastra/client-js@1.13.5-alpha.5
45
+ - @mastra/react@0.2.27-alpha.5
46
+
47
+ ## 22.1.3-alpha.4
48
+
49
+ ### Patch Changes
50
+
51
+ - Updated dependencies [[`0474c2b`](https://github.com/mastra-ai/mastra/commit/0474c2b2e7c7e1ad8691dca031284841391ff1ef), [`f607106`](https://github.com/mastra-ai/mastra/commit/f607106854c6416c4a07d4082604b9f66d047221), [`62919a6`](https://github.com/mastra-ai/mastra/commit/62919a6ee0fbf3779ad21a97b1ec6696515d5104), [`0fd90a2`](https://github.com/mastra-ai/mastra/commit/0fd90a215caf5fca8099c15a67ca03e4427747a3)]:
52
+ - @mastra/core@1.26.0-alpha.4
53
+ - @mastra/client-js@1.13.5-alpha.4
54
+ - @mastra/react@0.2.27-alpha.4
55
+
3
56
  ## 22.1.3-alpha.3
4
57
 
5
58
  ### Patch Changes
package/dist/index.cjs.js CHANGED
@@ -3386,7 +3386,7 @@ function cn(...inputs) {
3386
3386
  return twMerge(clsx(inputs));
3387
3387
  }
3388
3388
 
3389
- const sizeClasses$4 = {
3389
+ const sizeClasses$5 = {
3390
3390
  sm: `${formElementSizes.sm} text-ui-sm px-[.75em]`,
3391
3391
  md: `${formElementSizes.md} text-ui-md px-[.75em]`,
3392
3392
  default: `${formElementSizes.default} text-ui-md px-[.85em] `,
@@ -3419,7 +3419,7 @@ function resolveVariant(variant) {
3419
3419
  function buttonVariants(options) {
3420
3420
  const variant = resolveVariant(options?.variant || "default");
3421
3421
  const size = options?.size || "default";
3422
- return cn(sharedStyles, sizeClasses$4[size], variantClasses$4[variant], options?.iconOnly && "[&>svg]:opacity-75");
3422
+ return cn(sharedStyles, sizeClasses$5[size], variantClasses$4[variant], options?.iconOnly && "[&>svg]:opacity-75");
3423
3423
  }
3424
3424
  function flattenChildren(children) {
3425
3425
  const result = [];
@@ -4797,7 +4797,7 @@ const AlertDescription = ({ children, as: As = "p" }) => {
4797
4797
  return /* @__PURE__ */ jsxRuntime.jsx(Txt, { as: As, variant: "ui-sm", children });
4798
4798
  };
4799
4799
 
4800
- const sizeClasses$3 = {
4800
+ const sizeClasses$4 = {
4801
4801
  sm: "h-avatar-sm w-avatar-sm",
4802
4802
  md: "h-avatar-md w-avatar-md",
4803
4803
  lg: "h-avatar-lg w-avatar-lg"
@@ -4807,7 +4807,7 @@ const Avatar = ({ src, name, size = "sm", interactive = false }) => {
4807
4807
  "div",
4808
4808
  {
4809
4809
  className: cn(
4810
- sizeClasses$3[size],
4810
+ sizeClasses$4[size],
4811
4811
  "border border-border1 bg-surface3 shrink-0 overflow-hidden rounded-full flex items-center justify-center",
4812
4812
  transitions.all,
4813
4813
  interactive && "cursor-pointer hover:scale-105 hover:border-neutral2 hover:shadow-sm"
@@ -7043,7 +7043,7 @@ function SelectFieldBlock({
7043
7043
  ] });
7044
7044
  }
7045
7045
 
7046
- const sizeClasses$2 = {
7046
+ const sizeClasses$3 = {
7047
7047
  sm: `${formElementSizes.sm} w-form-sm`,
7048
7048
  md: `${formElementSizes.md} w-form-md`,
7049
7049
  lg: `${formElementSizes.lg} w-form-lg`,
@@ -7076,7 +7076,7 @@ const IconButton = React.forwardRef(
7076
7076
  baseButtonStyles,
7077
7077
  formElementFocus,
7078
7078
  variantClasses$1[variant],
7079
- sizeClasses$2[size],
7079
+ sizeClasses$3[size],
7080
7080
  disabled && "active:scale-100",
7081
7081
  className
7082
7082
  ),
@@ -7240,7 +7240,7 @@ function MetricsCardError({
7240
7240
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-col gap-3 items-center justify-center", className), children: /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-ui-sm text-accent2", children: message }) });
7241
7241
  }
7242
7242
 
7243
- const sizeClasses$1 = {
7243
+ const sizeClasses$2 = {
7244
7244
  sm: "w-4 h-4",
7245
7245
  md: "w-6 h-6",
7246
7246
  lg: "w-8 h-8"
@@ -7249,7 +7249,7 @@ function Spinner({ color, className, size = "md" }) {
7249
7249
  return /* @__PURE__ */ jsxRuntime.jsx(
7250
7250
  "svg",
7251
7251
  {
7252
- className: cn("animate-spin", sizeClasses$1[size], className),
7252
+ className: cn("animate-spin", sizeClasses$2[size], className),
7253
7253
  style: { animationDuration: "800ms", animationTimingFunction: "cubic-bezier(0.4, 0, 0.2, 1)" },
7254
7254
  xmlns: "http://www.w3.org/2000/svg",
7255
7255
  width: "24",
@@ -7661,6 +7661,49 @@ const Slider = React__namespace.forwardRef(({ className, ...props }, ref) => /*
7661
7661
  ));
7662
7662
  Slider.displayName = SliderPrimitive__namespace.Root.displayName;
7663
7663
 
7664
+ const sizeClasses$1 = {
7665
+ sm: "w-6",
7666
+ md: "w-10",
7667
+ lg: "w-16"
7668
+ };
7669
+ function BrandLoader({ className, size = "md", "aria-label": ariaLabel = "Loading" }) {
7670
+ const reactId = React.useId();
7671
+ const filterId = `brand-loader-${reactId.replace(/[^a-zA-Z0-9_-]/g, "")}`;
7672
+ return /* @__PURE__ */ jsxRuntime.jsx(
7673
+ "div",
7674
+ {
7675
+ role: "status",
7676
+ "aria-label": ariaLabel,
7677
+ className: cn("brand-loader inline-block text-neutral6", sizeClasses$1[size], className),
7678
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
7679
+ "svg",
7680
+ {
7681
+ xmlns: "http://www.w3.org/2000/svg",
7682
+ viewBox: "0 0 34 21",
7683
+ className: "block w-full h-auto overflow-visible",
7684
+ "aria-hidden": "true",
7685
+ children: [
7686
+ /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("filter", { id: filterId, children: [
7687
+ /* @__PURE__ */ jsxRuntime.jsx("feGaussianBlur", { in: "SourceGraphic", stdDeviation: "0.55" }),
7688
+ /* @__PURE__ */ jsxRuntime.jsx("feColorMatrix", { values: "1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 18 -7" })
7689
+ ] }) }),
7690
+ /* @__PURE__ */ jsxRuntime.jsxs("g", { filter: `url(#${filterId})`, children: [
7691
+ /* @__PURE__ */ jsxRuntime.jsx("line", { className: "brand-loader-ln23", x1: "10.4", y1: "4.5", x2: "16.8", y2: "16.2" }),
7692
+ /* @__PURE__ */ jsxRuntime.jsx("line", { className: "brand-loader-ln34", x1: "16.8", y1: "16.2", x2: "23.2", y2: "4.5" }),
7693
+ /* @__PURE__ */ jsxRuntime.jsx("line", { className: "brand-loader-ln45", x1: "23.2", y1: "4.5", x2: "29.5", y2: "16.2" }),
7694
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "brand-loader-b1", cx: "4.5", cy: "16.2", r: "4.5" }),
7695
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "brand-loader-b2", cx: "10.4", cy: "4.5", r: "4.5" }),
7696
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "brand-loader-b3", cx: "16.8", cy: "16.2", r: "4.5" }),
7697
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "brand-loader-b4", cx: "23.2", cy: "4.5", r: "4.5" }),
7698
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { className: "brand-loader-b5", cx: "29.5", cy: "16.2", r: "4.5" })
7699
+ ] })
7700
+ ]
7701
+ }
7702
+ )
7703
+ }
7704
+ );
7705
+ }
7706
+
7664
7707
  const Switch = React__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
7665
7708
  SwitchPrimitives__namespace.Root,
7666
7709
  {
@@ -11347,6 +11390,45 @@ function DataListSkeleton({ columns = "auto 1fr auto auto", numberOfRows = 3 })
11347
11390
  )) });
11348
11391
  }
11349
11392
 
11393
+ function toDate$2(value) {
11394
+ const date = value instanceof Date ? value : new Date(value);
11395
+ return isNaN(date.getTime()) ? null : date;
11396
+ }
11397
+ function ScoresDataListDateCell({ timestamp }) {
11398
+ const date = toDate$2(timestamp);
11399
+ return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height: "compact", className: "text-ui-smd text-neutral2", children: date ? dateFns.isToday(date) ? "Today" : dateFns.format(date, "MMM dd") : "-" });
11400
+ }
11401
+ function ScoresDataListTimeCell({ timestamp }) {
11402
+ const date = toDate$2(timestamp);
11403
+ return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height: "compact", className: "text-ui-smd text-neutral3", children: date ? dateFns.format(date, "h:mm:ss aaa") : "-" });
11404
+ }
11405
+ function ScoresDataListInputCell({ input }) {
11406
+ return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height: "compact", className: "min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-neutral3 text-ui-smd font-mono truncate", children: input != null ? JSON.stringify(input) : "-" }) });
11407
+ }
11408
+ function ScoresDataListEntityCell({ entityId }) {
11409
+ return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height: "compact", className: "min-w-0", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "block text-ui-smd truncate", children: entityId || "-" }) });
11410
+ }
11411
+ function ScoresDataListScoreCell({ score }) {
11412
+ const display = score == null ? "-" : typeof score === "object" ? JSON.stringify(score) : String(score);
11413
+ return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height: "compact", className: "text-ui-smd font-mono text-neutral3", children: display });
11414
+ }
11415
+
11416
+ function ScoresDataListRoot(props) {
11417
+ return /* @__PURE__ */ jsxRuntime.jsx(DataListRoot, { ...props });
11418
+ }
11419
+ const ScoresDataList = Object.assign(ScoresDataListRoot, {
11420
+ Top: DataListTop,
11421
+ TopCell: DataListTopCell,
11422
+ RowButton: DataListRowButton,
11423
+ NoMatch: DataListNoMatch,
11424
+ NextPageLoading: DataListNextPageLoading,
11425
+ DateCell: ScoresDataListDateCell,
11426
+ TimeCell: ScoresDataListTimeCell,
11427
+ InputCell: ScoresDataListInputCell,
11428
+ EntityCell: ScoresDataListEntityCell,
11429
+ ScoreCell: ScoresDataListScoreCell
11430
+ });
11431
+
11350
11432
  function toDate$1(value) {
11351
11433
  const date = value instanceof Date ? value : new Date(value);
11352
11434
  return isNaN(date.getTime()) ? null : date;
@@ -11409,7 +11491,10 @@ function TracesDataListStatusCell({ status }) {
11409
11491
  return /* @__PURE__ */ jsxRuntime.jsx(DataListCell, { height: "compact", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "uppercase text-ui-sm font-semibold", style: { color: config.color }, children: config.label }) });
11410
11492
  }
11411
11493
 
11412
- const TracesDataList = Object.assign(DataListRoot, {
11494
+ function TracesDataListRoot(props) {
11495
+ return /* @__PURE__ */ jsxRuntime.jsx(DataListRoot, { ...props });
11496
+ }
11497
+ const TracesDataList = Object.assign(TracesDataListRoot, {
11413
11498
  Top: DataListTop,
11414
11499
  TopCell: DataListTopCell,
11415
11500
  RowButton: DataListRowButton,
@@ -14128,6 +14213,7 @@ exports.Avatar = Avatar;
14128
14213
  exports.AzureIcon = AzureIcon;
14129
14214
  exports.Badge = Badge;
14130
14215
  exports.BranchIcon = BranchIcon;
14216
+ exports.BrandLoader = BrandLoader;
14131
14217
  exports.Breadcrumb = Breadcrumb;
14132
14218
  exports.Button = Button;
14133
14219
  exports.ButtonWithTooltip = ButtonWithTooltip;
@@ -14310,6 +14396,7 @@ exports.RuleFieldSelect = RuleFieldSelect;
14310
14396
  exports.RuleOperatorSelect = RuleOperatorSelect;
14311
14397
  exports.RuleRow = RuleRow;
14312
14398
  exports.RuleValueInput = RuleValueInput;
14399
+ exports.ScoresDataList = ScoresDataList;
14313
14400
  exports.ScrollArea = ScrollArea;
14314
14401
  exports.ScrollBar = ScrollBar;
14315
14402
  exports.ScrollableContainer = ScrollableContainer;