@mastra/playground-ui 28.0.1 → 29.0.0-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.css CHANGED
@@ -999,10 +999,6 @@
999
999
  margin-left: var(--spacing-2);
1000
1000
  }
1001
1001
 
1002
- .ml-4 {
1003
- margin-left: var(--spacing-4);
1004
- }
1005
-
1006
1002
  .ml-8 {
1007
1003
  margin-left: var(--spacing-8);
1008
1004
  }
@@ -3198,6 +3194,10 @@
3198
3194
  fill: currentColor;
3199
3195
  }
3200
3196
 
3197
+ .fill-none {
3198
+ fill: none;
3199
+ }
3200
+
3201
3201
  .fill-surface3 {
3202
3202
  fill: var(--color-surface3);
3203
3203
  }
@@ -3210,6 +3210,10 @@
3210
3210
  stroke: var(--color-accent5);
3211
3211
  }
3212
3212
 
3213
+ .stroke-border1 {
3214
+ stroke: var(--color-border1);
3215
+ }
3216
+
3213
3217
  .stroke-3 {
3214
3218
  stroke-width: 3px;
3215
3219
  }
@@ -3258,6 +3262,10 @@
3258
3262
  padding: var(--spacing-8);
3259
3263
  }
3260
3264
 
3265
+ .p-12 {
3266
+ padding: var(--spacing-12);
3267
+ }
3268
+
3261
3269
  .p-\[24px\] {
3262
3270
  padding: 24px;
3263
3271
  }
@@ -3983,6 +3991,10 @@
3983
3991
  color: var(--color-white) !important;
3984
3992
  }
3985
3993
 
3994
+ .capitalize {
3995
+ text-transform: capitalize;
3996
+ }
3997
+
3986
3998
  .uppercase {
3987
3999
  text-transform: uppercase;
3988
4000
  }
@@ -4276,10 +4288,6 @@
4276
4288
  user-select: none;
4277
4289
  }
4278
4290
 
4279
- .zoom-in-95 {
4280
- --tw-enter-scale: .95;
4281
- }
4282
-
4283
4291
  .\[scrollbar-width\:none\] {
4284
4292
  scrollbar-width: none;
4285
4293
  }
@@ -5359,6 +5367,17 @@
5359
5367
  opacity: .5;
5360
5368
  }
5361
5369
 
5370
+ .data-\[ending-style\]\:scale-95[data-ending-style] {
5371
+ --tw-scale-x: 95%;
5372
+ --tw-scale-y: 95%;
5373
+ --tw-scale-z: 95%;
5374
+ scale: var(--tw-scale-x) var(--tw-scale-y);
5375
+ }
5376
+
5377
+ .data-\[ending-style\]\:opacity-0[data-ending-style] {
5378
+ opacity: 0;
5379
+ }
5380
+
5362
5381
  .data-\[highlighted\]\:bg-surface4[data-highlighted] {
5363
5382
  background-color: var(--color-surface4);
5364
5383
  }
@@ -5371,6 +5390,10 @@
5371
5390
  opacity: 1;
5372
5391
  }
5373
5392
 
5393
+ .data-\[instant\]\:transition-none[data-instant] {
5394
+ transition-property: none;
5395
+ }
5396
+
5374
5397
  .data-\[overflow-x-end\]\:mask-r-from-\[calc\(100\%-2rem\)\][data-overflow-x-end] {
5375
5398
  -webkit-mask-image: var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic);
5376
5399
  -webkit-mask-image: var(--tw-mask-linear), var(--tw-mask-radial), var(--tw-mask-conic);
@@ -5452,6 +5475,10 @@
5452
5475
  color: var(--color-neutral6);
5453
5476
  }
5454
5477
 
5478
+ .data-\[side\=bottom\]\:-top-\[8px\][data-side="bottom"] {
5479
+ top: -8px;
5480
+ }
5481
+
5455
5482
  .data-\[side\=bottom\]\:translate-y-1[data-side="bottom"] {
5456
5483
  --tw-translate-y: var(--spacing-1);
5457
5484
  translate: var(--tw-translate-x) var(--tw-translate-y);
@@ -5461,33 +5488,68 @@
5461
5488
  --tw-enter-translate-y: calc(1*var(--spacing)*-1);
5462
5489
  }
5463
5490
 
5491
+ .data-\[side\=left\]\:-right-\[10px\][data-side="left"] {
5492
+ right: -10px;
5493
+ }
5494
+
5464
5495
  .data-\[side\=left\]\:-translate-x-1[data-side="left"] {
5465
5496
  --tw-translate-x: calc(var(--spacing-1) * -1);
5466
5497
  translate: var(--tw-translate-x) var(--tw-translate-y);
5467
5498
  }
5468
5499
 
5500
+ .data-\[side\=left\]\:rotate-90[data-side="left"] {
5501
+ rotate: 90deg;
5502
+ }
5503
+
5469
5504
  .data-\[side\=left\]\:slide-in-from-right-1[data-side="left"] {
5470
5505
  --tw-enter-translate-x: calc(1*var(--spacing));
5471
5506
  }
5472
5507
 
5508
+ .data-\[side\=right\]\:-left-\[10px\][data-side="right"] {
5509
+ left: -10px;
5510
+ }
5511
+
5473
5512
  .data-\[side\=right\]\:translate-x-1[data-side="right"] {
5474
5513
  --tw-translate-x: var(--spacing-1);
5475
5514
  translate: var(--tw-translate-x) var(--tw-translate-y);
5476
5515
  }
5477
5516
 
5517
+ .data-\[side\=right\]\:-rotate-90[data-side="right"] {
5518
+ rotate: -90deg;
5519
+ }
5520
+
5478
5521
  .data-\[side\=right\]\:slide-in-from-left-1[data-side="right"] {
5479
5522
  --tw-enter-translate-x: calc(1*var(--spacing)*-1);
5480
5523
  }
5481
5524
 
5525
+ .data-\[side\=top\]\:-bottom-\[8px\][data-side="top"] {
5526
+ bottom: -8px;
5527
+ }
5528
+
5482
5529
  .data-\[side\=top\]\:-translate-y-1[data-side="top"] {
5483
5530
  --tw-translate-y: calc(var(--spacing-1) * -1);
5484
5531
  translate: var(--tw-translate-x) var(--tw-translate-y);
5485
5532
  }
5486
5533
 
5534
+ .data-\[side\=top\]\:rotate-180[data-side="top"] {
5535
+ rotate: 180deg;
5536
+ }
5537
+
5487
5538
  .data-\[side\=top\]\:slide-in-from-bottom-1[data-side="top"] {
5488
5539
  --tw-enter-translate-y: calc(1*var(--spacing));
5489
5540
  }
5490
5541
 
5542
+ .data-\[starting-style\]\:scale-95[data-starting-style] {
5543
+ --tw-scale-x: 95%;
5544
+ --tw-scale-y: 95%;
5545
+ --tw-scale-z: 95%;
5546
+ scale: var(--tw-scale-x) var(--tw-scale-y);
5547
+ }
5548
+
5549
+ .data-\[starting-style\]\:opacity-0[data-starting-style] {
5550
+ opacity: 0;
5551
+ }
5552
+
5491
5553
  .data-\[state\=checked\]\:translate-x-4[data-state="checked"] {
5492
5554
  --tw-translate-x: var(--spacing-4);
5493
5555
  translate: var(--tw-translate-x) var(--tw-translate-y);
package/dist/index.es.js CHANGED
@@ -3,7 +3,7 @@ import { Shadows, Glows, BorderColors, Colors, Sizes, FontSizes, LineHeights, Bo
3
3
  import './index.css';export { Animations } from './tokens.es.js';
4
4
  import * as React from 'react';
5
5
  import React__default, { useState, useRef, useCallback, createContext, useContext, useSyncExternalStore, useMemo, useEffect, useLayoutEffect, forwardRef, useId, Suspense, Fragment as Fragment$1 } from 'react';
6
- import * as TooltipPrimitive from '@radix-ui/react-tooltip';
6
+ import { Tooltip as Tooltip$1 } from '@base-ui/react/tooltip';
7
7
  import { jsonLanguage, json } from '@codemirror/lang-json';
8
8
  import { markdown, markdownLanguage } from '@codemirror/lang-markdown';
9
9
  import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';
@@ -48,7 +48,7 @@ import { MergeView } from '@codemirror/merge';
48
48
  import { format as format$1 } from 'date-fns/format';
49
49
  import { isToday } from 'date-fns/isToday';
50
50
  import { SearchCursor } from '@codemirror/search';
51
- import { ResponsiveContainer, LineChart, CartesianGrid, XAxis, YAxis, Tooltip as Tooltip$1, Line } from 'recharts';
51
+ import { ResponsiveContainer, LineChart, CartesianGrid, XAxis, YAxis, Tooltip as Tooltip$2, Line } from 'recharts';
52
52
  import { usePanelRef, Panel, Separator as Separator$1 } from 'react-resizable-panels';
53
53
  import { create } from 'zustand';
54
54
  import { persist } from 'zustand/middleware';
@@ -3521,26 +3521,88 @@ const cva = (base, config)=>(props)=>{
3521
3521
  return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
3522
3522
  };
3523
3523
 
3524
- const TooltipProvider = TooltipPrimitive.Provider;
3525
- const Tooltip = TooltipPrimitive.Root;
3526
- const TooltipTrigger = TooltipPrimitive.Trigger;
3527
- const TooltipContent = React.forwardRef(({ className, sideOffset = 4, children, ...props }, ref) => /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
3528
- TooltipPrimitive.Content,
3529
- {
3530
- ref,
3531
- sideOffset,
3532
- className: cn(
3533
- "z-50 overflow-hidden rounded-lg border border-border1 bg-surface3 px-2.5 py-1.5 text-ui-sm leading-ui-sm text-neutral5 shadow-dialog animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
3534
- className
3535
- ),
3536
- ...props,
3537
- children: [
3538
- children,
3539
- /* @__PURE__ */ jsx(TooltipPrimitive.Arrow, { className: "fill-surface3" })
3540
- ]
3524
+ function TooltipProvider({ delay, delayDuration, timeout, skipDelayDuration, ...props }) {
3525
+ const resolvedDelay = delay ?? delayDuration;
3526
+ const resolvedTimeout = timeout ?? skipDelayDuration;
3527
+ return /* @__PURE__ */ jsx(
3528
+ Tooltip$1.Provider,
3529
+ {
3530
+ ...resolvedDelay !== void 0 ? { delay: resolvedDelay } : {},
3531
+ ...resolvedTimeout !== void 0 ? { timeout: resolvedTimeout } : {},
3532
+ ...props
3533
+ }
3534
+ );
3535
+ }
3536
+ const Tooltip = Tooltip$1.Root;
3537
+ const TooltipTrigger = React.forwardRef(
3538
+ ({ asChild, render, children, ...props }, ref) => {
3539
+ if (asChild && React.isValidElement(children)) {
3540
+ return /* @__PURE__ */ jsx(Tooltip$1.Trigger, { ref, render: children, ...props });
3541
+ }
3542
+ return /* @__PURE__ */ jsx(Tooltip$1.Trigger, { ref, render, ...props, children });
3541
3543
  }
3542
- ) }));
3543
- TooltipContent.displayName = TooltipPrimitive.Content.displayName;
3544
+ );
3545
+ TooltipTrigger.displayName = "TooltipTrigger";
3546
+ const TooltipContent = React.forwardRef(
3547
+ ({ className, side = "top", sideOffset = 8, align = "center", alignOffset = 0, children, ...props }, ref) => /* @__PURE__ */ jsx(Tooltip$1.Portal, { children: /* @__PURE__ */ jsx(
3548
+ Tooltip$1.Positioner,
3549
+ {
3550
+ side,
3551
+ sideOffset,
3552
+ align,
3553
+ alignOffset,
3554
+ arrowPadding: 10,
3555
+ className: "isolate z-[100]",
3556
+ children: /* @__PURE__ */ jsxs(
3557
+ Tooltip$1.Popup,
3558
+ {
3559
+ ref,
3560
+ role: "tooltip",
3561
+ className: cn(
3562
+ "relative z-[100] flex flex-col origin-(--transform-origin) rounded-lg border border-border1 bg-surface3 px-2.5 py-1.5 text-ui-sm leading-ui-sm text-neutral5 shadow-dialog transition-[transform,scale,opacity] duration-150",
3563
+ "data-[starting-style]:scale-95 data-[starting-style]:opacity-0",
3564
+ "data-[ending-style]:scale-95 data-[ending-style]:opacity-0",
3565
+ "data-[instant]:transition-none",
3566
+ className
3567
+ ),
3568
+ ...props,
3569
+ children: [
3570
+ children,
3571
+ /* @__PURE__ */ jsx(
3572
+ Tooltip$1.Arrow,
3573
+ {
3574
+ className: cn(
3575
+ "flex",
3576
+ "data-[side=top]:-bottom-[8px] data-[side=top]:rotate-180",
3577
+ "data-[side=bottom]:-top-[8px]",
3578
+ "data-[side=left]:-right-[10px] data-[side=left]:rotate-90",
3579
+ "data-[side=right]:-left-[10px] data-[side=right]:-rotate-90"
3580
+ ),
3581
+ children: /* @__PURE__ */ jsx(TooltipArrowSvg, {})
3582
+ }
3583
+ )
3584
+ ]
3585
+ }
3586
+ )
3587
+ }
3588
+ ) })
3589
+ );
3590
+ TooltipContent.displayName = "TooltipContent";
3591
+ function TooltipArrowSvg() {
3592
+ return /* @__PURE__ */ jsxs("svg", { width: "12", height: "8", viewBox: "0 0 12 8", fill: "none", overflow: "visible", children: [
3593
+ /* @__PURE__ */ jsx("path", { d: "M0 7L4 2Q6 0 8 2L12 7L12 8L0 8Z", className: "fill-surface3" }),
3594
+ /* @__PURE__ */ jsx(
3595
+ "path",
3596
+ {
3597
+ d: "M0 7.5L4 2.5Q6 0.5 8 2.5L12 7.5",
3598
+ className: "fill-none stroke-border1",
3599
+ strokeWidth: "1",
3600
+ strokeLinejoin: "round",
3601
+ strokeLinecap: "round"
3602
+ }
3603
+ )
3604
+ ] });
3605
+ }
3544
3606
 
3545
3607
  const formElementSizes = {
3546
3608
  sm: "h-form-sm",
@@ -10788,14 +10850,14 @@ function MainSidebarNavLink({
10788
10850
  /* @__PURE__ */ jsx(MainSidebarNavLabel, { state, children: link.name }),
10789
10851
  children,
10790
10852
  link.isExperimental && !isCollapsed && !needsTooltip && /* @__PURE__ */ jsxs(Tooltip, { children: [
10791
- /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(CircleAlertIcon, { className: "ml-auto stroke-accent5" }) }),
10792
- /* @__PURE__ */ jsx(TooltipContent, { side: "right", align: "center", className: "ml-4", children: "Experimental Feature" })
10853
+ /* @__PURE__ */ jsx(TooltipTrigger, { render: /* @__PURE__ */ jsx(CircleAlertIcon, { className: "ml-auto stroke-accent5" }) }),
10854
+ /* @__PURE__ */ jsx(TooltipContent, { side: "right", align: "center", sideOffset: 16, children: "Experimental Feature" })
10793
10855
  ] })
10794
10856
  ] });
10795
10857
  }
10796
- return /* @__PURE__ */ jsx("li", { ...props, className: cn("flex relative min-w-0", className), children: link && needsTooltip && interactiveEl ? /* @__PURE__ */ jsxs(Tooltip, { children: [
10797
- /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: interactiveEl }),
10798
- /* @__PURE__ */ jsx(TooltipContent, { side: "right", align: "center", className: "ml-4", children: link.tooltipMsg ? isCollapsed ? `${link.name} | ${link.tooltipMsg}` : link.tooltipMsg : link.name })
10858
+ return /* @__PURE__ */ jsx("li", { ...props, className: cn("flex relative min-w-0", className), children: link && needsTooltip && React__default.isValidElement(interactiveEl) ? /* @__PURE__ */ jsxs(Tooltip, { children: [
10859
+ /* @__PURE__ */ jsx(TooltipTrigger, { render: interactiveEl }),
10860
+ /* @__PURE__ */ jsx(TooltipContent, { side: "right", align: "center", sideOffset: 16, children: link.tooltipMsg ? isCollapsed ? `${link.name} | ${link.tooltipMsg}` : link.tooltipMsg : link.name })
10799
10861
  ] }) : interactiveEl ?? children });
10800
10862
  }
10801
10863
 
@@ -11100,39 +11162,42 @@ function MainSidebarTrigger({ className, onClick, ...props }) {
11100
11162
  const { desktopState, toggleSidebar } = useMainSidebar();
11101
11163
  const isCollapsed = desktopState === "collapsed";
11102
11164
  return /* @__PURE__ */ jsxs(Tooltip, { children: [
11103
- /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
11104
- "button",
11165
+ /* @__PURE__ */ jsx(
11166
+ TooltipTrigger,
11105
11167
  {
11106
- type: "button",
11107
- "aria-label": "Toggle sidebar",
11108
- "aria-expanded": !isCollapsed,
11109
- ...props,
11110
- onClick: (event) => {
11111
- onClick?.(event);
11112
- if (!event.defaultPrevented) toggleSidebar();
11113
- },
11114
- className: cn(
11115
- "flex items-center justify-center text-neutral3 rounded-md",
11116
- // Both states share size-9 (36px) — matches NavLink height,
11117
- // so toggling collapse never shifts surrounding rows.
11118
- "size-9",
11119
- isCollapsed ? "mx-auto" : "ml-auto",
11120
- "hover:bg-sidebar-nav-hover hover:text-neutral6",
11121
- "transition-all duration-normal ease-out-custom",
11122
- "focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-accent1 focus-visible:shadow-focus-ring",
11123
- "[&_svg]:w-4 [&_svg]:h-4 [&_svg]:text-neutral3 [&:hover_svg]:text-neutral5 [&_svg]:transition-transform [&_svg]:duration-normal",
11124
- className
11125
- ),
11126
- children: /* @__PURE__ */ jsx(
11127
- PanelRightIcon,
11168
+ render: /* @__PURE__ */ jsx(
11169
+ "button",
11128
11170
  {
11129
- className: cn({
11130
- "rotate-180": isCollapsed
11131
- })
11171
+ type: "button",
11172
+ "aria-label": "Toggle sidebar",
11173
+ "aria-expanded": !isCollapsed,
11174
+ ...props,
11175
+ onClick: (event) => {
11176
+ onClick?.(event);
11177
+ if (!event.defaultPrevented) toggleSidebar();
11178
+ },
11179
+ className: cn(
11180
+ "flex items-center justify-center text-neutral3 rounded-md",
11181
+ "size-9",
11182
+ isCollapsed ? "mx-auto" : "ml-auto",
11183
+ "hover:bg-sidebar-nav-hover hover:text-neutral6",
11184
+ "transition-all duration-normal ease-out-custom",
11185
+ "focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-accent1 focus-visible:shadow-focus-ring",
11186
+ "[&_svg]:w-4 [&_svg]:h-4 [&_svg]:text-neutral3 [&:hover_svg]:text-neutral5 [&_svg]:transition-transform [&_svg]:duration-normal",
11187
+ className
11188
+ ),
11189
+ children: /* @__PURE__ */ jsx(
11190
+ PanelRightIcon,
11191
+ {
11192
+ className: cn({
11193
+ "rotate-180": isCollapsed
11194
+ })
11195
+ }
11196
+ )
11132
11197
  }
11133
11198
  )
11134
11199
  }
11135
- ) }),
11200
+ ),
11136
11201
  /* @__PURE__ */ jsxs(TooltipContent, { children: [
11137
11202
  "Toggle Sidebar",
11138
11203
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 [&>svg]:w-[1em] [&>svg]:h-[1em]", children: [
@@ -13206,12 +13271,6 @@ function getShortId(id) {
13206
13271
  function TracesDataListIdCell({ traceId }) {
13207
13272
  return /* @__PURE__ */ jsx(DataListCell, { height: "compact", className: "text-ui-smd font-mono text-neutral3", children: getShortId(traceId) });
13208
13273
  }
13209
- function TracesDataListKindCell({ parentSpanId }) {
13210
- const isRoot = parentSpanId == null;
13211
- const Icon = isRoot ? ListTreeIcon : CornerDownRightIcon;
13212
- const label = isRoot ? "Trace" : "Subtrace";
13213
- return /* @__PURE__ */ jsx(DataListCell, { height: "compact", className: "flex items-center justify-center", children: /* @__PURE__ */ jsx("span", { title: label, "aria-label": label, className: "inline-flex", children: /* @__PURE__ */ jsx(Icon, { className: cn("shrink-0", isRoot ? "size-4 text-neutral3" : "size-3 text-neutral3"), "aria-hidden": true }) }) });
13214
- }
13215
13274
  function TracesDataListDateCell({ timestamp }) {
13216
13275
  const date = toDate$2(timestamp);
13217
13276
  return /* @__PURE__ */ jsx(DataListCell, { height: "compact", className: "text-ui-smd text-neutral2", children: date ? isToday$1(date) ? "Today" : format(date, "MMM dd") : "-" });
@@ -13226,8 +13285,18 @@ function TracesDataListTimeCell({ timestamp }) {
13226
13285
  ] })
13227
13286
  ] }) : "-" });
13228
13287
  }
13229
- function TracesDataListNameCell({ name }) {
13230
- return /* @__PURE__ */ jsx(DataListCell, { height: "compact", className: "text-neutral4 text-ui-smd min-w-0 truncate", children: name || "-" });
13288
+ function TracesDataListNameCell({ name, parentSpanId, showLevelTooltip }) {
13289
+ const isRoot = parentSpanId == null;
13290
+ const Icon = isRoot ? ListTreeIcon : CornerDownRightIcon;
13291
+ const label = isRoot ? "Trace" : "Subtrace";
13292
+ const icon = /* @__PURE__ */ jsx("span", { "aria-label": label, className: "inline-flex shrink-0", children: /* @__PURE__ */ jsx(Icon, { className: cn("size-4 shrink-0", isRoot ? "text-neutral3" : "text-neutral2"), "aria-hidden": true }) });
13293
+ return /* @__PURE__ */ jsxs(DataListCell, { height: "compact", className: "text-neutral4 text-ui-smd min-w-0 flex items-center gap-2", children: [
13294
+ showLevelTooltip ? /* @__PURE__ */ jsxs(Tooltip, { children: [
13295
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: icon }),
13296
+ /* @__PURE__ */ jsx(TooltipContent, { children: label })
13297
+ ] }) : icon,
13298
+ /* @__PURE__ */ jsx("span", { className: "min-w-0 truncate", children: name || "-" })
13299
+ ] });
13231
13300
  }
13232
13301
  function TracesDataListInputCell({ input }) {
13233
13302
  return /* @__PURE__ */ jsx(DataListCell, { height: "compact", className: "min-w-0", children: /* @__PURE__ */ jsx("span", { className: "block text-neutral3 text-ui-smd font-mono truncate", children: input || "-" }) });
@@ -13276,7 +13345,6 @@ const TracesDataList = Object.assign(TracesDataListRoot, {
13276
13345
  SubHeading: DataListSubHeading,
13277
13346
  Spacer: DataListSpacer,
13278
13347
  IdCell: TracesDataListIdCell,
13279
- KindCell: TracesDataListKindCell,
13280
13348
  DateCell: TracesDataListDateCell,
13281
13349
  TimeCell: TracesDataListTimeCell,
13282
13350
  NameCell: TracesDataListNameCell,
@@ -13659,8 +13727,36 @@ function PageLayoutRoot({
13659
13727
  );
13660
13728
  }
13661
13729
 
13662
- function PageLayoutRow({ children, className }) {
13663
- return /* @__PURE__ */ jsx("div", { className: cn("flex items-start justify-between", className), children });
13730
+ const pageLayoutRowVariants = cva("flex justify-between gap-3", {
13731
+ variants: {
13732
+ align: {
13733
+ start: "items-start",
13734
+ center: "items-center"
13735
+ },
13736
+ stack: {
13737
+ horizontal: "flex-row",
13738
+ responsive: "flex-col items-stretch sm:flex-row"
13739
+ }
13740
+ },
13741
+ compoundVariants: [
13742
+ {
13743
+ stack: "responsive",
13744
+ align: "start",
13745
+ class: "sm:items-start"
13746
+ },
13747
+ {
13748
+ stack: "responsive",
13749
+ align: "center",
13750
+ class: "sm:items-center"
13751
+ }
13752
+ ],
13753
+ defaultVariants: {
13754
+ align: "start",
13755
+ stack: "horizontal"
13756
+ }
13757
+ });
13758
+ function PageLayoutRow({ children, className, align, stack }) {
13759
+ return /* @__PURE__ */ jsx("div", { className: cn(pageLayoutRowVariants({ align, stack }), className), children });
13664
13760
  }
13665
13761
 
13666
13762
  function PageLayoutTopArea({ children, className }) {
@@ -15062,7 +15158,7 @@ function MetricsLineChart({
15062
15158
  domain: yDomain
15063
15159
  }
15064
15160
  ),
15065
- /* @__PURE__ */ jsx(Tooltip$1, { content: /* @__PURE__ */ jsx(MetricsLineChartTooltip, {}) }),
15161
+ /* @__PURE__ */ jsx(Tooltip$2, { content: /* @__PURE__ */ jsx(MetricsLineChartTooltip, {}) }),
15066
15162
  series.map((s) => /* @__PURE__ */ jsx(
15067
15163
  Line,
15068
15164
  {
@@ -17280,14 +17376,13 @@ function useModelUsageCostMetrics() {
17280
17376
  return useQuery({
17281
17377
  queryKey: ["metrics", "model-usage-cost", filterKey],
17282
17378
  queryFn: async () => {
17283
- const metrics = [
17284
- "mastra_model_total_input_tokens",
17285
- "mastra_model_total_output_tokens",
17286
- "mastra_model_input_cache_read_tokens",
17287
- "mastra_model_input_cache_write_tokens"
17288
- ];
17289
17379
  const [inputRes, outputRes, cacheReadRes, cacheWriteRes] = await Promise.all(
17290
- metrics.map(
17380
+ [
17381
+ "mastra_model_total_input_tokens",
17382
+ "mastra_model_total_output_tokens",
17383
+ "mastra_model_input_cache_read_tokens",
17384
+ "mastra_model_input_cache_write_tokens"
17385
+ ].map(
17291
17386
  (name) => client.getMetricBreakdown({
17292
17387
  name: [name],
17293
17388
  groupBy: ["model"],
@@ -17326,13 +17421,11 @@ function useModelUsageCostMetrics() {
17326
17421
  const m = group.dimensions.model ?? "unknown";
17327
17422
  const entry = ensureModel(m);
17328
17423
  entry.cacheRead = group.value;
17329
- addCost(entry, group);
17330
17424
  }
17331
17425
  for (const group of cacheWriteRes.groups) {
17332
17426
  const m = group.dimensions.model ?? "unknown";
17333
17427
  const entry = ensureModel(m);
17334
17428
  entry.cacheWrite = group.value;
17335
- addCost(entry, group);
17336
17429
  }
17337
17430
  return Array.from(modelMap.entries()).map(([model, vals]) => ({
17338
17431
  model,
@@ -17530,11 +17623,9 @@ function useTokenUsageByAgentMetrics() {
17530
17623
  orderDirection: "DESC",
17531
17624
  filters
17532
17625
  };
17533
- const [inputRes, outputRes, cacheReadRes, cacheWriteRes] = await Promise.all([
17626
+ const [inputRes, outputRes] = await Promise.all([
17534
17627
  client.getMetricBreakdown({ ...breakdownBase, name: ["mastra_model_total_input_tokens"] }),
17535
- client.getMetricBreakdown({ ...breakdownBase, name: ["mastra_model_total_output_tokens"] }),
17536
- client.getMetricBreakdown({ ...breakdownBase, name: ["mastra_model_input_cache_read_tokens"] }),
17537
- client.getMetricBreakdown({ ...breakdownBase, name: ["mastra_model_input_cache_write_tokens"] })
17628
+ client.getMetricBreakdown({ ...breakdownBase, name: ["mastra_model_total_output_tokens"] })
17538
17629
  ]);
17539
17630
  const agentMap = /* @__PURE__ */ new Map();
17540
17631
  const ensure = (name) => {
@@ -17561,16 +17652,6 @@ function useTokenUsageByAgentMetrics() {
17561
17652
  entry.output = group.value;
17562
17653
  addCost(entry, group);
17563
17654
  }
17564
- for (const group of cacheReadRes.groups) {
17565
- const name = group.dimensions.entityName ?? "unknown";
17566
- const entry = ensure(name);
17567
- addCost(entry, group);
17568
- }
17569
- for (const group of cacheWriteRes.groups) {
17570
- const name = group.dimensions.entityName ?? "unknown";
17571
- const entry = ensure(name);
17572
- addCost(entry, group);
17573
- }
17574
17655
  return Array.from(agentMap.entries()).map(([name, vals]) => ({
17575
17656
  name,
17576
17657
  input: vals.input,
@@ -20001,7 +20082,7 @@ function TracesLayout({
20001
20082
  );
20002
20083
  }
20003
20084
 
20004
- const COLUMNS$1 = "4rem 6rem 9rem 14rem minmax(8rem,1fr) 14rem 6rem";
20085
+ const COLUMNS$1 = "6rem 9rem 14rem minmax(8rem,1fr) 14rem 6rem";
20005
20086
  const ROW_HEIGHT$1 = 36;
20006
20087
  const OVERSCAN$1 = 8;
20007
20088
  function TracesListView({
@@ -20013,6 +20094,7 @@ function TracesListView({
20013
20094
  filtersApplied,
20014
20095
  featuredTraceId,
20015
20096
  featuredSpanId,
20097
+ isBranchesMode,
20016
20098
  onTraceClick
20017
20099
  }) {
20018
20100
  const scrollRef = useRef(null);
@@ -20038,22 +20120,6 @@ function TracesListView({
20038
20120
  const paddingBottom = virtualItems.length > 0 ? Math.max(0, totalSize - (virtualItems[virtualItems.length - 1]?.end ?? 0)) : 0;
20039
20121
  return /* @__PURE__ */ jsxs(TracesDataList, { columns: COLUMNS$1, scrollRef, className: "min-w-0", children: [
20040
20122
  /* @__PURE__ */ jsxs(TracesDataList.Top, { children: [
20041
- /* @__PURE__ */ jsx(
20042
- TracesDataList.TopCellWithTooltip,
20043
- {
20044
- tooltip: /* @__PURE__ */ jsxs("div", { className: "grid gap-1", children: [
20045
- /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5", children: [
20046
- /* @__PURE__ */ jsx(ListTreeIcon, { className: "size-4 shrink-0", "aria-hidden": true }),
20047
- "Trace"
20048
- ] }),
20049
- /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-1.5", children: [
20050
- /* @__PURE__ */ jsx(CornerDownRightIcon, { className: "size-4 shrink-0", "aria-hidden": true }),
20051
- "Subtrace"
20052
- ] })
20053
- ] }),
20054
- children: "Level"
20055
- }
20056
- ),
20057
20123
  /* @__PURE__ */ jsx(TracesDataList.TopCell, { children: "Date" }),
20058
20124
  /* @__PURE__ */ jsx(TracesDataList.TopCell, { children: "Time" }),
20059
20125
  /* @__PURE__ */ jsx(TracesDataList.TopCell, { children: "Name" }),
@@ -20082,10 +20148,16 @@ function TracesListView({
20082
20148
  onClick: () => onTraceClick(trace),
20083
20149
  className: cn(isFeatured && "bg-surface4"),
20084
20150
  children: [
20085
- /* @__PURE__ */ jsx(TracesDataList.KindCell, { parentSpanId: trace.parentSpanId }),
20086
20151
  /* @__PURE__ */ jsx(TracesDataList.DateCell, { timestamp: displayDate }),
20087
20152
  /* @__PURE__ */ jsx(TracesDataList.TimeCell, { timestamp: displayDate }),
20088
- /* @__PURE__ */ jsx(TracesDataList.NameCell, { name: trace.name }),
20153
+ /* @__PURE__ */ jsx(
20154
+ TracesDataList.NameCell,
20155
+ {
20156
+ name: trace.name,
20157
+ parentSpanId: trace.parentSpanId,
20158
+ showLevelTooltip: isBranchesMode
20159
+ }
20160
+ ),
20089
20161
  /* @__PURE__ */ jsx(TracesDataList.InputCell, { input: getInputPreview(trace.input) }),
20090
20162
  /* @__PURE__ */ jsx(TracesDataList.EntityCell, { entityType: trace.entityType, entityName }),
20091
20163
  /* @__PURE__ */ jsx(TracesDataList.StatusCell, { status: trace.attributes?.status })