@mastra/playground-ui 27.0.0-alpha.7 → 27.0.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +651 -0
  2. package/dist/index.cjs.js +878 -447
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.css +279 -88
  5. package/dist/index.es.js +864 -442
  6. package/dist/index.es.js.map +1 -1
  7. package/dist/src/domains/traces/components/format-hierarchical-spans.d.ts +7 -1
  8. package/dist/src/domains/traces/components/index.d.ts +1 -0
  9. package/dist/src/domains/traces/components/span-data-panel-view.d.ts +7 -1
  10. package/dist/src/domains/traces/components/trace-data-panel-view.d.ts +7 -1
  11. package/dist/src/domains/traces/components/traces-list-mode-toggle.d.ts +12 -0
  12. package/dist/src/domains/traces/components/traces-list-view.d.ts +8 -1
  13. package/dist/src/domains/traces/components/traces-toolbar.d.ts +5 -1
  14. package/dist/src/domains/traces/hooks/index.d.ts +2 -0
  15. package/dist/src/domains/traces/hooks/use-branch.d.ts +52 -0
  16. package/dist/src/domains/traces/hooks/use-trace-list-navigation.d.ts +7 -2
  17. package/dist/src/domains/traces/hooks/use-trace-or-branch-spans.d.ts +25 -0
  18. package/dist/src/domains/traces/hooks/use-trace-url-state.d.ts +12 -1
  19. package/dist/src/domains/traces/trace-filters.d.ts +3 -0
  20. package/dist/src/ds/components/Button/Button.d.ts +1 -1
  21. package/dist/src/ds/components/ButtonsGroup/buttons-group.d.ts +30 -5
  22. package/dist/src/ds/components/ButtonsGroup/buttons-group.stories.d.ts +5 -0
  23. package/dist/src/ds/components/Combobox/combobox-styles.d.ts +19 -11
  24. package/dist/src/ds/components/Combobox/combobox.d.ts +3 -3
  25. package/dist/src/ds/components/Combobox/combobox.stories.d.ts +1 -0
  26. package/dist/src/ds/components/Combobox/index.d.ts +1 -0
  27. package/dist/src/ds/components/Command/command.d.ts +1 -1
  28. package/dist/src/ds/components/Input/input.d.ts +2 -2
  29. package/dist/src/ds/components/InputGroup/index.d.ts +1 -0
  30. package/dist/src/ds/components/InputGroup/input-group.d.ts +44 -0
  31. package/dist/src/ds/components/InputGroup/input-group.stories.d.ts +17 -0
  32. package/dist/src/ds/components/PropertyFilter/property-filter-applied.d.ts +11 -1
  33. package/dist/src/ds/components/PropertyFilter/property-filter-creator.d.ts +7 -1
  34. package/dist/src/ds/components/ScrollArea/scroll-area.d.ts +28 -7
  35. package/dist/src/ds/components/ScrollArea/scroll-area.stories.d.ts +4 -0
  36. package/dist/src/ds/components/StatusBadge/StatusBadge.d.ts +1 -1
  37. package/dist/src/ds/components/Tabs/tabs-list.d.ts +8 -2
  38. package/dist/src/ds/components/Tabs/tabs.stories.d.ts +2 -0
  39. package/dist/src/ds/components/Textarea/textarea.d.ts +2 -2
  40. package/dist/src/index.d.ts +1 -1
  41. package/package.json +7 -8
  42. package/dist/src/ds/components/Threads/index.d.ts +0 -1
  43. package/dist/src/ds/components/Threads/threads.d.ts +0 -28
  44. package/dist/src/ds/components/Threads/threads.stories.d.ts +0 -12
package/dist/index.es.js CHANGED
@@ -1,10 +1,9 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { X, CheckIcon as CheckIcon$1, CopyIcon, Wand2, ShieldX, LogIn, Check, ChevronsUpDown, Search, ChevronDown, Circle, TriangleAlertIcon, SearchIcon, XIcon, TrendingUpIcon, TrendingDownIcon, EllipsisVerticalIcon, SaveIcon, Trash2Icon, ListFilterPlusIcon, ArrowLeftIcon, FilterIcon, PlusIcon, ChevronLeftIcon, ChevronRightIcon, Monitor, Sun, Moon, CalendarIcon, CircleAlertIcon, InfoIcon as InfoIcon$1, ArrowRightIcon, Type, Hash, ToggleLeft, AlignLeft, Braces, List, MenuIcon, PanelRightIcon, KeyboardIcon, AlignLeftIcon, AlignJustifyIcon, ArrowUpIcon, ArrowDownIcon, ChevronsRightIcon, ClockIcon, BanIcon, FileTextIcon, OctagonAlertIcon, LightbulbIcon, ChevronRight, Folder, File, AlertTriangle, CircleXIcon, ExpandIcon, ExternalLinkIcon, Link2Icon, Ban, ListX, ChevronsLeft, ChevronsRight, ChevronLeft, Text, TextSearch, EqualNot, Equal, Plus, Component, ArrowRight, ArrowLeft, LogsIcon as LogsIcon$1, EyeIcon, GaugeIcon, BrainIcon, ChevronUpIcon, ChevronDownIcon, ChevronsUpIcon, ChevronsDownIcon, FoldVerticalIcon, UnfoldVerticalIcon, ChevronsDownUpIcon, ChevronsUpDownIcon, CircleGaugeIcon, FileInputIcon, FileOutputIcon, BracesIcon, CircleSlashIcon } from 'lucide-react';
2
+ import { Shadows, Glows, BorderColors, Colors, Sizes, FontSizes, LineHeights, BorderRadius, Spacings } from './tokens.es.js';
3
+ import './index.css';export { Animations } from './tokens.es.js';
3
4
  import * as React from 'react';
4
5
  import React__default, { useState, useRef, useCallback, createContext, useContext, useSyncExternalStore, useMemo, useEffect, useLayoutEffect, forwardRef, useId, Suspense, Fragment as Fragment$1 } from 'react';
5
6
  import * as TooltipPrimitive from '@radix-ui/react-tooltip';
6
- import { Shadows, Glows, BorderColors, Colors, Sizes, FontSizes, LineHeights, BorderRadius, Spacings } from './tokens.es.js';
7
- import './index.css';export { Animations } from './tokens.es.js';
8
7
  import { jsonLanguage, json } from '@codemirror/lang-json';
9
8
  import { markdown, markdownLanguage } from '@codemirror/lang-markdown';
10
9
  import { HighlightStyle, syntaxHighlighting } from '@codemirror/language';
@@ -15,16 +14,18 @@ import { tags } from '@lezer/highlight';
15
14
  import { draculaInit } from '@uiw/codemirror-theme-dracula';
16
15
  import ReactCodeMirror from '@uiw/react-codemirror';
17
16
  import { autocompletion } from '@codemirror/autocomplete';
17
+ import { CheckIcon as CheckIcon$1, CopyIcon, Wand2, ShieldX, LogIn, Check, ChevronsUpDown, Search, X, ChevronDown, Circle, TriangleAlertIcon, SearchIcon, XIcon, TrendingUpIcon, TrendingDownIcon, EllipsisVerticalIcon, SaveIcon, Trash2Icon, LockIcon, ListFilterPlusIcon, ArrowLeftIcon, FilterIcon, PlusIcon, ChevronLeftIcon, ChevronRightIcon, Monitor, Sun, Moon, CalendarIcon, CircleAlertIcon, InfoIcon as InfoIcon$1, ArrowRightIcon, Type, Hash, ToggleLeft, AlignLeft, Braces, List, MenuIcon, PanelRightIcon, KeyboardIcon, AlignLeftIcon, AlignJustifyIcon, ArrowUpIcon, ArrowDownIcon, ChevronsRightIcon, ClockIcon, BanIcon, FileTextIcon, OctagonAlertIcon, LightbulbIcon, ChevronRight, Folder, File, AlertTriangle, CircleXIcon, ExpandIcon, ExternalLinkIcon, Link2Icon, Ban, ListX, ChevronsLeft, ChevronsRight, ChevronLeft, Text, TextSearch, EqualNot, Equal, Plus, Component, ArrowRight, ArrowLeft, LogsIcon as LogsIcon$1, EyeIcon, GaugeIcon, BrainIcon, ChevronUpIcon, ChevronDownIcon, ChevronsUpIcon, ChevronsDownIcon, FoldVerticalIcon, UnfoldVerticalIcon, ChevronsDownUpIcon, ChevronsUpDownIcon, CircleGaugeIcon, FileInputIcon, FileOutputIcon, BracesIcon, CircleSlashIcon } from 'lucide-react';
18
18
  import { toast as toast$1, Toaster as Toaster$1 } from 'sonner';
19
19
  import { useMastraClient } from '@mastra/react';
20
20
  import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
21
21
  import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
22
22
  import * as CollapsiblePrimitive from '@radix-ui/react-collapsible';
23
23
  import { Combobox as Combobox$1 } from '@base-ui/react/combobox';
24
+ export { Combobox as ComboboxPrimitive } from '@base-ui/react/combobox';
24
25
  import { Command as Command$1 } from 'cmdk';
25
26
  import * as DialogPrimitive from '@radix-ui/react-dialog';
26
27
  import * as SelectPrimitive from '@radix-ui/react-select';
27
- import * as RadixTabs from '@radix-ui/react-tabs';
28
+ import { Tabs as Tabs$1 } from '@base-ui/react/tabs';
28
29
  import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
29
30
  import { Portal, SubContent } from '@radix-ui/react-dropdown-menu';
30
31
  import * as VisuallyHidden from '@radix-ui/react-visually-hidden';
@@ -34,7 +35,7 @@ import Markdown from 'react-markdown';
34
35
  import remarkGfm from 'remark-gfm';
35
36
  import * as PopoverPrimitive from '@radix-ui/react-popover';
36
37
  import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
37
- import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
38
+ import { ScrollArea as ScrollArea$1 } from '@base-ui/react/scroll-area';
38
39
  import { useDebouncedCallback } from 'use-debounce';
39
40
  import * as SliderPrimitive from '@radix-ui/react-slider';
40
41
  import * as SwitchPrimitives from '@radix-ui/react-switch';
@@ -57,47 +58,6 @@ import { useVirtualizer } from '@tanstack/react-virtual';
57
58
 
58
59
  function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
59
60
 
60
- const falsyToString = (value)=>typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
61
- const cx = clsx;
62
- const cva = (base, config)=>(props)=>{
63
- var _config_compoundVariants;
64
- if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
65
- const { variants, defaultVariants } = config;
66
- const getVariantClassNames = Object.keys(variants).map((variant)=>{
67
- const variantProp = props === null || props === void 0 ? void 0 : props[variant];
68
- const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
69
- if (variantProp === null) return null;
70
- const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
71
- return variants[variant][variantKey];
72
- });
73
- const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
74
- let [key, value] = param;
75
- if (value === undefined) {
76
- return acc;
77
- }
78
- acc[key] = value;
79
- return acc;
80
- }, {});
81
- const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{
82
- let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
83
- return Object.entries(compoundVariantOptions).every((param)=>{
84
- let [key, value] = param;
85
- return Array.isArray(value) ? value.includes({
86
- ...defaultVariants,
87
- ...propsWithoutUndefined
88
- }[key]) : ({
89
- ...defaultVariants,
90
- ...propsWithoutUndefined
91
- })[key] === value;
92
- }) ? [
93
- ...acc,
94
- cvClass,
95
- cvClassName
96
- ] : acc;
97
- }, []);
98
- return cx(base, getVariantClassNames, getCompoundVariantClassNames, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
99
- };
100
-
101
61
  /**
102
62
  * Concatenates two arrays faster than the array spread operator.
103
63
  */
@@ -3382,6 +3342,185 @@ function cn(...inputs) {
3382
3342
  return twMerge(clsx(inputs));
3383
3343
  }
3384
3344
 
3345
+ const variants = {
3346
+ // UI text sizes
3347
+ "ui-xs": "text-ui-xs leading-ui-xs",
3348
+ "ui-sm": "text-ui-sm leading-ui-sm",
3349
+ "ui-smd": "text-ui-smd leading-ui-smd",
3350
+ "ui-md": "text-ui-md leading-ui-md",
3351
+ "ui-lg": "text-ui-lg leading-ui-lg",
3352
+ // Header sizes
3353
+ "header-xs": "text-header-xs leading-header-xs",
3354
+ "header-sm": "text-header-sm leading-header-sm",
3355
+ "header-md": "text-header-md leading-header-md",
3356
+ "header-lg": "text-header-lg leading-header-lg",
3357
+ "header-xl": "text-header-xl leading-header-xl"
3358
+ };
3359
+ const fonts = {
3360
+ mono: "font-mono"
3361
+ };
3362
+ const Txt = ({ as: Root = "p", className, variant = "ui-md", font, ...props }) => {
3363
+ return /* @__PURE__ */ jsx(Root, { className: cn(variants[variant], font && fonts[font], className), ...props });
3364
+ };
3365
+
3366
+ const transitions = {
3367
+ // For color changes (background, text, border)
3368
+ colors: "transition-colors duration-normal ease-out-custom",
3369
+ // For transform changes (scale, translate, rotate)
3370
+ transform: "transition-transform duration-normal ease-out-custom",
3371
+ // For all property changes
3372
+ all: "transition-all duration-normal ease-out-custom",
3373
+ // For opacity changes
3374
+ opacity: "transition-opacity duration-normal ease-out-custom",
3375
+ // For shadow changes
3376
+ shadow: "transition-shadow duration-normal ease-out-custom",
3377
+ // For slower transitions (sidebar collapse, etc.)
3378
+ allSlow: "transition-all duration-slow ease-out-custom"
3379
+ };
3380
+ const hoverEffects = {
3381
+ // Subtle scale effect for buttons and cards
3382
+ scale: "hover:scale-[1.02] active:scale-[0.98]",
3383
+ // Even more subtle scale for active state only
3384
+ scaleSubtle: "active:scale-[0.98]",
3385
+ // Brightness increase
3386
+ brightness: "hover:brightness-110",
3387
+ // Background lift
3388
+ lift: "hover:bg-surface4"
3389
+ };
3390
+ const focusRing = {
3391
+ // Standard focus ring with glow
3392
+ default: "focus:outline-hidden focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring",
3393
+ // Focus ring without glow
3394
+ simple: "focus:outline-hidden focus:ring-1 focus:ring-accent1",
3395
+ // Focus visible only (keyboard navigation)
3396
+ visible: "focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-accent1 focus-visible:shadow-focus-ring"
3397
+ };
3398
+
3399
+ const sizeClasses$4 = {
3400
+ sm: "h-avatar-sm w-avatar-sm",
3401
+ md: "h-avatar-md w-avatar-md",
3402
+ lg: "h-avatar-lg w-avatar-lg"
3403
+ };
3404
+ const Avatar = ({ src, name, size = "sm", interactive = false }) => {
3405
+ return /* @__PURE__ */ jsx(
3406
+ "div",
3407
+ {
3408
+ className: cn(
3409
+ sizeClasses$4[size],
3410
+ "border border-border1 bg-surface3 shrink-0 overflow-hidden rounded-full flex items-center justify-center",
3411
+ transitions.all,
3412
+ interactive && "cursor-pointer hover:scale-105 hover:border-neutral2 hover:shadow-sm"
3413
+ ),
3414
+ children: src ? /* @__PURE__ */ jsx("img", { src, alt: name, className: "h-full w-full object-cover" }) : /* @__PURE__ */ jsx(Txt, { variant: "ui-md", className: "text-center text-neutral4", children: name[0].toUpperCase() })
3415
+ }
3416
+ );
3417
+ };
3418
+
3419
+ const sizes = {
3420
+ sm: "[&>svg]:h-icon-sm [&>svg]:w-icon-sm",
3421
+ default: "[&>svg]:h-icon-default [&>svg]:w-icon-default",
3422
+ lg: "[&>svg]:h-icon-lg [&>svg]:w-icon-lg"
3423
+ };
3424
+ const Icon = ({ children, className, size = "default", ...props }) => {
3425
+ return /* @__PURE__ */ jsx("span", { className: cn("block", sizes[size], className), ...props, children });
3426
+ };
3427
+
3428
+ const variantClasses = {
3429
+ default: "text-neutral5 bg-surface4 border-border1",
3430
+ success: "text-notice-success-fg bg-notice-success/20 border-notice-success/20",
3431
+ error: "text-notice-destructive-fg bg-notice-destructive/20 border-notice-destructive/20",
3432
+ info: "text-notice-info-fg bg-notice-info/20 border-notice-info/20",
3433
+ warning: "text-notice-warning-fg bg-notice-warning/20 border-notice-warning/20"
3434
+ };
3435
+ const Badge = ({ icon, variant = "default", className, children, ...props }) => {
3436
+ return /* @__PURE__ */ jsxs(
3437
+ "div",
3438
+ {
3439
+ className: cn(
3440
+ "font-mono text-ui-sm gap-1 h-badge-default inline-flex items-center rounded-full border shrink-0",
3441
+ transitions.colors,
3442
+ icon ? "pl-2 pr-2.5" : "px-2.5",
3443
+ variantClasses[variant],
3444
+ className
3445
+ ),
3446
+ ...props,
3447
+ children: [
3448
+ icon && /* @__PURE__ */ jsx(Icon, { size: "sm", children: icon }),
3449
+ children
3450
+ ]
3451
+ }
3452
+ );
3453
+ };
3454
+
3455
+ const SlashIcon = (props) => /* @__PURE__ */ jsx("svg", { width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ jsx("path", { d: "M5.25684 12.6387L10.4003 3.36133H11.7432L6.5997 12.6387H5.25684Z", fill: "currentColor" }) });
3456
+
3457
+ const Breadcrumb = ({ children, label }) => {
3458
+ return /* @__PURE__ */ jsx("nav", { "aria-label": label, children: /* @__PURE__ */ jsx("ol", { className: "gap-0.5 flex items-center", children }) });
3459
+ };
3460
+ const Crumb = ({ className, as, isCurrent, action, ...props }) => {
3461
+ const Root = as || "span";
3462
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
3463
+ /* @__PURE__ */ jsxs("li", { className: "flex h-full shrink-0 items-center gap-1", children: [
3464
+ /* @__PURE__ */ jsx(
3465
+ Root,
3466
+ {
3467
+ "aria-current": isCurrent ? "page" : void 0,
3468
+ className: cn(
3469
+ "text-ui-md leading-ui-md flex items-center gap-2",
3470
+ transitions.colors,
3471
+ isCurrent ? "text-white" : "text-neutral3 hover:text-neutral5",
3472
+ className
3473
+ ),
3474
+ ...props
3475
+ }
3476
+ ),
3477
+ action
3478
+ ] }),
3479
+ !isCurrent && /* @__PURE__ */ jsx("li", { role: "separator", className: "flex h-full items-center", children: /* @__PURE__ */ jsx(Icon, { className: cn("text-neutral2", transitions.colors), children: /* @__PURE__ */ jsx(SlashIcon, {}) }) })
3480
+ ] });
3481
+ };
3482
+
3483
+ const falsyToString = (value)=>typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
3484
+ const cx = clsx;
3485
+ const cva = (base, config)=>(props)=>{
3486
+ var _config_compoundVariants;
3487
+ if ((config === null || config === void 0 ? void 0 : config.variants) == null) return cx(base, props === null || props === void 0 ? void 0 : props.class, props === null || props === void 0 ? void 0 : props.className);
3488
+ const { variants, defaultVariants } = config;
3489
+ const getVariantClassNames = Object.keys(variants).map((variant)=>{
3490
+ const variantProp = props === null || props === void 0 ? void 0 : props[variant];
3491
+ const defaultVariantProp = defaultVariants === null || defaultVariants === void 0 ? void 0 : defaultVariants[variant];
3492
+ if (variantProp === null) return null;
3493
+ const variantKey = falsyToString(variantProp) || falsyToString(defaultVariantProp);
3494
+ return variants[variant][variantKey];
3495
+ });
3496
+ const propsWithoutUndefined = props && Object.entries(props).reduce((acc, param)=>{
3497
+ let [key, value] = param;
3498
+ if (value === undefined) {
3499
+ return acc;
3500
+ }
3501
+ acc[key] = value;
3502
+ return acc;
3503
+ }, {});
3504
+ const getCompoundVariantClassNames = config === null || config === void 0 ? void 0 : (_config_compoundVariants = config.compoundVariants) === null || _config_compoundVariants === void 0 ? void 0 : _config_compoundVariants.reduce((acc, param)=>{
3505
+ let { class: cvClass, className: cvClassName, ...compoundVariantOptions } = param;
3506
+ return Object.entries(compoundVariantOptions).every((param)=>{
3507
+ let [key, value] = param;
3508
+ return Array.isArray(value) ? value.includes({
3509
+ ...defaultVariants,
3510
+ ...propsWithoutUndefined
3511
+ }[key]) : ({
3512
+ ...defaultVariants,
3513
+ ...propsWithoutUndefined
3514
+ })[key] === value;
3515
+ }) ? [
3516
+ ...acc,
3517
+ cvClass,
3518
+ cvClassName
3519
+ ] : acc;
3520
+ }, []);
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
+ };
3523
+
3385
3524
  const TooltipProvider = TooltipPrimitive.Provider;
3386
3525
  const Tooltip = TooltipPrimitive.Root;
3387
3526
  const TooltipTrigger = TooltipPrimitive.Trigger;
@@ -3403,15 +3542,6 @@ const TooltipContent = React.forwardRef(({ className, sideOffset = 4, children,
3403
3542
  ) }));
3404
3543
  TooltipContent.displayName = TooltipPrimitive.Content.displayName;
3405
3544
 
3406
- const sizes = {
3407
- sm: "[&>svg]:h-icon-sm [&>svg]:w-icon-sm",
3408
- default: "[&>svg]:h-icon-default [&>svg]:w-icon-default",
3409
- lg: "[&>svg]:h-icon-lg [&>svg]:w-icon-lg"
3410
- };
3411
- const Icon = ({ children, className, size = "default", ...props }) => {
3412
- return /* @__PURE__ */ jsx("span", { className: cn("block", sizes[size], className), ...props, children });
3413
- };
3414
-
3415
3545
  const formElementSizes = {
3416
3546
  sm: "h-form-sm",
3417
3547
  md: "h-form-md",
@@ -3444,7 +3574,7 @@ const buttonVariants = cva(
3444
3574
  default: "bg-surface3 border border-border1 hover:bg-surface5 hover:text-neutral6 active:bg-surface6 text-neutral6",
3445
3575
  primary: "bg-surface4 border border-border2 hover:bg-surface5 hover:text-neutral6 active:bg-surface6 text-neutral6",
3446
3576
  cta: "bg-accent1 border border-transparent hover:bg-accent1/90 hover:shadow-glow-accent1 disabled:hover:shadow-none text-surface1 font-medium",
3447
- ghost: "bg-transparent border border-transparent hover:bg-surface4 hover:text-neutral6 active:bg-surface5 text-neutral4",
3577
+ ghost: "bg-transparent border border-transparent hover:bg-surface3 hover:text-neutral6 active:bg-surface4 text-neutral4",
3448
3578
  outline: "bg-transparent border border-border1 hover:bg-surface3 hover:text-neutral6 active:bg-surface4 text-neutral5",
3449
3579
  link: "inline-flex justify-start rounded-none h-auto px-0 bg-transparent text-neutral3 hover:text-neutral4 gap-1 [&>svg]:mx-0 w-auto [&>svg]:opacity-70"
3450
3580
  },
@@ -3529,189 +3659,6 @@ const ButtonWithTooltip = React__default.forwardRef(
3529
3659
  );
3530
3660
  ButtonWithTooltip.displayName = "ButtonWithTooltip";
3531
3661
 
3532
- const transitions = {
3533
- // For color changes (background, text, border)
3534
- colors: "transition-colors duration-normal ease-out-custom",
3535
- // For transform changes (scale, translate, rotate)
3536
- transform: "transition-transform duration-normal ease-out-custom",
3537
- // For all property changes
3538
- all: "transition-all duration-normal ease-out-custom",
3539
- // For opacity changes
3540
- opacity: "transition-opacity duration-normal ease-out-custom",
3541
- // For shadow changes
3542
- shadow: "transition-shadow duration-normal ease-out-custom",
3543
- // For slower transitions (sidebar collapse, etc.)
3544
- allSlow: "transition-all duration-slow ease-out-custom"
3545
- };
3546
- const hoverEffects = {
3547
- // Subtle scale effect for buttons and cards
3548
- scale: "hover:scale-[1.02] active:scale-[0.98]",
3549
- // Even more subtle scale for active state only
3550
- scaleSubtle: "active:scale-[0.98]",
3551
- // Brightness increase
3552
- brightness: "hover:brightness-110",
3553
- // Background lift
3554
- lift: "hover:bg-surface4"
3555
- };
3556
- const focusRing = {
3557
- // Standard focus ring with glow
3558
- default: "focus:outline-hidden focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring",
3559
- // Focus ring without glow
3560
- simple: "focus:outline-hidden focus:ring-1 focus:ring-accent1",
3561
- // Focus visible only (keyboard navigation)
3562
- visible: "focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-accent1 focus-visible:shadow-focus-ring"
3563
- };
3564
-
3565
- const Threads = ({ children }) => {
3566
- return /* @__PURE__ */ jsx("nav", { className: "min-h-full overflow-hidden", children });
3567
- };
3568
- const ThreadLink = ({ children, as: Component = "a", href, className, prefetch, to }) => {
3569
- return /* @__PURE__ */ jsx(
3570
- Component,
3571
- {
3572
- href,
3573
- prefetch,
3574
- to,
3575
- className: cn(
3576
- "text-ui-sm flex h-full w-full flex-col justify-center font-medium cursor-pointer",
3577
- transitions.colors,
3578
- className
3579
- ),
3580
- children
3581
- }
3582
- );
3583
- };
3584
- const ThreadList = ({ children }) => {
3585
- return /* @__PURE__ */ jsx("ol", { "data-testid": "thread-list", children });
3586
- };
3587
- const ThreadItem = ({ children, isActive, className }) => {
3588
- return /* @__PURE__ */ jsx(
3589
- "li",
3590
- {
3591
- className: cn(
3592
- "border-b border-border1 group flex h-[54px] items-center justify-between gap-2 px-3 py-2",
3593
- transitions.colors,
3594
- "hover:bg-surface3",
3595
- isActive && "bg-accent1Dark",
3596
- className
3597
- ),
3598
- children
3599
- }
3600
- );
3601
- };
3602
- const ThreadDeleteButton = ({ onClick }) => {
3603
- return /* @__PURE__ */ jsx(
3604
- Button,
3605
- {
3606
- variant: "ghost",
3607
- className: cn(
3608
- "shrink-0 opacity-0",
3609
- transitions.all,
3610
- "group-focus-within:opacity-100 group-hover:opacity-100",
3611
- "hover:bg-surface4 hover:text-accent2"
3612
- ),
3613
- onClick,
3614
- children: /* @__PURE__ */ jsx(Icon, { children: /* @__PURE__ */ jsx(X, { "aria-label": "delete thread", className: "text-neutral3 hover:text-accent2 transition-colors" }) })
3615
- }
3616
- );
3617
- };
3618
-
3619
- const variants = {
3620
- // UI text sizes
3621
- "ui-xs": "text-ui-xs leading-ui-xs",
3622
- "ui-sm": "text-ui-sm leading-ui-sm",
3623
- "ui-smd": "text-ui-smd leading-ui-smd",
3624
- "ui-md": "text-ui-md leading-ui-md",
3625
- "ui-lg": "text-ui-lg leading-ui-lg",
3626
- // Header sizes
3627
- "header-xs": "text-header-xs leading-header-xs",
3628
- "header-sm": "text-header-sm leading-header-sm",
3629
- "header-md": "text-header-md leading-header-md",
3630
- "header-lg": "text-header-lg leading-header-lg",
3631
- "header-xl": "text-header-xl leading-header-xl"
3632
- };
3633
- const fonts = {
3634
- mono: "font-mono"
3635
- };
3636
- const Txt = ({ as: Root = "p", className, variant = "ui-md", font, ...props }) => {
3637
- return /* @__PURE__ */ jsx(Root, { className: cn(variants[variant], font && fonts[font], className), ...props });
3638
- };
3639
-
3640
- const sizeClasses$4 = {
3641
- sm: "h-avatar-sm w-avatar-sm",
3642
- md: "h-avatar-md w-avatar-md",
3643
- lg: "h-avatar-lg w-avatar-lg"
3644
- };
3645
- const Avatar = ({ src, name, size = "sm", interactive = false }) => {
3646
- return /* @__PURE__ */ jsx(
3647
- "div",
3648
- {
3649
- className: cn(
3650
- sizeClasses$4[size],
3651
- "border border-border1 bg-surface3 shrink-0 overflow-hidden rounded-full flex items-center justify-center",
3652
- transitions.all,
3653
- interactive && "cursor-pointer hover:scale-105 hover:border-neutral2 hover:shadow-sm"
3654
- ),
3655
- children: src ? /* @__PURE__ */ jsx("img", { src, alt: name, className: "h-full w-full object-cover" }) : /* @__PURE__ */ jsx(Txt, { variant: "ui-md", className: "text-center text-neutral4", children: name[0].toUpperCase() })
3656
- }
3657
- );
3658
- };
3659
-
3660
- const variantClasses = {
3661
- default: "text-neutral5 bg-surface4 border-border1",
3662
- success: "text-notice-success-fg bg-notice-success/20 border-notice-success/20",
3663
- error: "text-notice-destructive-fg bg-notice-destructive/20 border-notice-destructive/20",
3664
- info: "text-notice-info-fg bg-notice-info/20 border-notice-info/20",
3665
- warning: "text-notice-warning-fg bg-notice-warning/20 border-notice-warning/20"
3666
- };
3667
- const Badge = ({ icon, variant = "default", className, children, ...props }) => {
3668
- return /* @__PURE__ */ jsxs(
3669
- "div",
3670
- {
3671
- className: cn(
3672
- "font-mono text-ui-sm gap-1 h-badge-default inline-flex items-center rounded-full border shrink-0",
3673
- transitions.colors,
3674
- icon ? "pl-2 pr-2.5" : "px-2.5",
3675
- variantClasses[variant],
3676
- className
3677
- ),
3678
- ...props,
3679
- children: [
3680
- icon && /* @__PURE__ */ jsx(Icon, { size: "sm", children: icon }),
3681
- children
3682
- ]
3683
- }
3684
- );
3685
- };
3686
-
3687
- const SlashIcon = (props) => /* @__PURE__ */ jsx("svg", { width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: /* @__PURE__ */ jsx("path", { d: "M5.25684 12.6387L10.4003 3.36133H11.7432L6.5997 12.6387H5.25684Z", fill: "currentColor" }) });
3688
-
3689
- const Breadcrumb = ({ children, label }) => {
3690
- return /* @__PURE__ */ jsx("nav", { "aria-label": label, children: /* @__PURE__ */ jsx("ol", { className: "gap-0.5 flex items-center", children }) });
3691
- };
3692
- const Crumb = ({ className, as, isCurrent, action, ...props }) => {
3693
- const Root = as || "span";
3694
- return /* @__PURE__ */ jsxs(Fragment, { children: [
3695
- /* @__PURE__ */ jsxs("li", { className: "flex h-full shrink-0 items-center gap-1", children: [
3696
- /* @__PURE__ */ jsx(
3697
- Root,
3698
- {
3699
- "aria-current": isCurrent ? "page" : void 0,
3700
- className: cn(
3701
- "text-ui-md leading-ui-md flex items-center gap-2",
3702
- transitions.colors,
3703
- isCurrent ? "text-white" : "text-neutral3 hover:text-neutral5",
3704
- className
3705
- ),
3706
- ...props
3707
- }
3708
- ),
3709
- action
3710
- ] }),
3711
- !isCurrent && /* @__PURE__ */ jsx("li", { role: "separator", className: "flex h-full items-center", children: /* @__PURE__ */ jsx(Icon, { className: cn("text-neutral2", transitions.colors), children: /* @__PURE__ */ jsx(SlashIcon, {}) }) })
3712
- ] });
3713
- };
3714
-
3715
3662
  function flattenSchemaToVariables(schema, maxDepth = 5) {
3716
3663
  if (!schema?.properties) {
3717
3664
  return [];
@@ -6043,16 +5990,29 @@ CollapsibleContent.displayName = CollapsiblePrimitive.CollapsibleContent.display
6043
5990
  const comboboxStyles = {
6044
5991
  /** Root wrapper */
6045
5992
  root: "flex flex-col gap-1.5",
6046
- /** Trigger — form input look, sized to mirror SelectTrigger. */
5993
+ /** Trigger base shared layout/typography for all variants. */
6047
5994
  trigger: cn(
6048
- "inline-flex w-full min-w-32 select-none items-center justify-between gap-1.5 whitespace-nowrap",
6049
- "rounded-lg border border-border1 bg-transparent px-2.5 text-ui-smd leading-ui-sm text-neutral4",
5995
+ "inline-flex w-full min-w-32 select-none items-center justify-between gap-1.5 whitespace-nowrap cursor-pointer",
5996
+ "rounded-lg border bg-transparent px-2.5 text-ui-smd leading-ui-sm text-neutral4",
6050
5997
  "outline-none transition-colors duration-normal ease-out-custom",
6051
- "hover:bg-surface3 hover:text-neutral6 hover:border-border2 active:bg-surface4",
6052
- "focus:outline-none focus-visible:outline-none focus-visible:border-border2",
6053
- "data-[popup-open]:bg-surface3 data-[popup-open]:text-neutral6 data-[popup-open]:border-border2",
5998
+ "focus:outline-none focus-visible:outline-none",
6054
5999
  "disabled:cursor-not-allowed disabled:opacity-50"
6055
6000
  ),
6001
+ /** Variant: default — bordered form input look. */
6002
+ triggerDefault: cn(
6003
+ "border-border1",
6004
+ "hover:bg-surface2 hover:text-neutral6 hover:border-border2 active:bg-surface3",
6005
+ "focus-visible:border-border2",
6006
+ "data-[popup-open]:bg-surface3 data-[popup-open]:text-neutral6 data-[popup-open]:border-border2"
6007
+ ),
6008
+ /** Variant: ghost — borderless, hover-only surface. */
6009
+ triggerGhost: cn(
6010
+ "border-transparent",
6011
+ "hover:bg-surface2 hover:text-neutral6 active:bg-surface3",
6012
+ "data-[popup-open]:bg-surface3 data-[popup-open]:text-neutral6"
6013
+ ),
6014
+ /** Variant: link — text-only trigger. */
6015
+ triggerLink: cn("border-transparent px-0", "hover:text-neutral6", "data-[popup-open]:text-neutral6"),
6056
6016
  /** Trigger with error state */
6057
6017
  triggerError: "border-accent2 hover:border-accent2 focus-visible:border-accent2",
6058
6018
  /** Chevron icon in trigger */
@@ -6061,7 +6021,7 @@ const comboboxStyles = {
6061
6021
  placeholder: "text-neutral3",
6062
6022
  /** Popup container — concentric with rounded-xl + p-1 (8px items inside 12px container). */
6063
6023
  popup: cn(
6064
- "min-w-(--anchor-width) w-max max-w-[500px] rounded-xl border border-border1 bg-surface3 text-neutral4",
6024
+ "min-w-(--anchor-width) w-max max-w-(--available-width) rounded-xl border border-border1 bg-surface3 text-neutral4",
6065
6025
  "shadow-dialog",
6066
6026
  "origin-(--transform-origin)",
6067
6027
  "transition-[transform,scale,opacity] duration-150 ease-out",
@@ -6071,9 +6031,9 @@ const comboboxStyles = {
6071
6031
  /** Positioner */
6072
6032
  positioner: "z-50 pointer-events-auto",
6073
6033
  /** Search input container — borderless top section, hairline divider below. */
6074
- searchContainer: cn("flex items-center border-b border-border1 px-2.5 py-2", transitions.colors),
6034
+ searchContainer: cn("flex items-center border-b border-border1 px-2.5 py-1.5", transitions.colors),
6075
6035
  /** Search icon */
6076
- searchIcon: cn("mr-2 h-4 w-4 shrink-0 text-neutral3", transitions.colors),
6036
+ searchIcon: cn("mr-2 h-3.5 w-3.5 shrink-0 text-neutral3", transitions.colors),
6077
6037
  /** Search input */
6078
6038
  searchInput: cn(
6079
6039
  "flex h-7 w-full rounded-md bg-transparent py-1 text-ui-smd leading-ui-sm text-neutral6",
@@ -6082,25 +6042,37 @@ const comboboxStyles = {
6082
6042
  transitions.colors
6083
6043
  ),
6084
6044
  /** Empty state */
6085
- empty: "not-empty:block hidden py-6 text-center text-ui-smd text-neutral3",
6045
+ empty: "not-empty:block hidden py-4 text-center text-ui-smd text-neutral3",
6086
6046
  /** Options list */
6087
6047
  list: "max-h-dropdown-max-height overflow-y-auto overflow-x-hidden p-1",
6088
- /** Option item base — rounded-lg (8px) sits concentrically inside rounded-xl + p-1. */
6048
+ /** Option item base — rounded-md sits concentrically inside rounded-xl + p-1. */
6089
6049
  item: cn(
6090
- "relative flex cursor-pointer select-none items-center gap-2.5 rounded-lg px-2 py-1.5",
6050
+ "group/item relative flex cursor-pointer select-none items-center gap-2 rounded-md",
6051
+ "pl-2.5 pr-2 py-1.5 min-h-8",
6091
6052
  "text-ui-smd leading-ui-sm text-neutral4",
6092
6053
  "outline-none focus:outline-none focus-visible:outline-none",
6093
6054
  transitions.colors,
6094
- "data-highlighted:bg-surface4 data-highlighted:text-neutral6"
6055
+ "data-highlighted:bg-surface4 data-highlighted:text-neutral6",
6056
+ "data-selected:text-neutral6"
6095
6057
  ),
6096
- /** Option item with selected state (single select) — quiet emphasis, no accent fill. */
6097
- itemSelected: "data-selected:text-neutral6",
6098
- /** Check indicator container */
6099
- checkContainer: "flex h-4 w-4 shrink-0 items-center justify-center",
6058
+ /** Multi-select item keeps the left checkbox slot, no right indicator. */
6059
+ itemMulti: cn(
6060
+ "relative flex cursor-pointer select-none items-center gap-2.5 rounded-md",
6061
+ "pl-2 pr-2.5 py-1.5 min-h-8",
6062
+ "text-ui-smd leading-ui-sm text-neutral4",
6063
+ "outline-none focus:outline-none focus-visible:outline-none",
6064
+ transitions.colors,
6065
+ "data-highlighted:bg-surface4 data-highlighted:text-neutral6",
6066
+ "data-selected:text-neutral6"
6067
+ ),
6068
+ /** Right-aligned slot grouping end content + selection check. */
6069
+ itemRightSlot: "ml-auto flex items-center gap-2 shrink-0",
6070
+ /** Check indicator container — inline, fixed 16x16, shown only when item is selected. */
6071
+ checkContainer: "flex h-4 w-4 shrink-0 items-center justify-center text-accent1",
6100
6072
  /** Check icon (single select) */
6101
- checkIcon: cn("h-4 w-4 text-neutral6", transitions.opacity),
6073
+ checkIcon: "h-3.5 w-3.5",
6102
6074
  /** Checkbox container (multi select) */
6103
- checkbox: "flex h-4 w-4 shrink-0 items-center justify-center rounded-sm border",
6075
+ checkbox: "flex h-4 w-4 shrink-0 items-center justify-center rounded-[4px] border",
6104
6076
  /** Checkbox selected state */
6105
6077
  checkboxSelected: "bg-accent1 border-accent1",
6106
6078
  /** Checkbox unselected state */
@@ -6115,12 +6087,17 @@ const comboboxStyles = {
6115
6087
  optionLabel: "truncate",
6116
6088
  /** Option description */
6117
6089
  optionDescription: "text-ui-sm text-neutral3 truncate",
6118
- /** Option end slot */
6119
- optionEnd: "ml-auto",
6090
+ /** Option end slot — `ml-auto` makes it push right inside flex containers (used by multi-select). */
6091
+ optionEnd: "ml-auto flex items-center shrink-0",
6120
6092
  /** Error message */
6121
6093
  error: "text-ui-sm text-accent2"
6122
6094
  };
6123
6095
 
6096
+ const triggerVariantStyles = {
6097
+ default: comboboxStyles.triggerDefault,
6098
+ ghost: comboboxStyles.triggerGhost,
6099
+ link: comboboxStyles.triggerLink
6100
+ };
6124
6101
  function Combobox({
6125
6102
  options,
6126
6103
  value,
@@ -6130,6 +6107,7 @@ function Combobox({
6130
6107
  emptyText = "No option found.",
6131
6108
  className,
6132
6109
  disabled = false,
6110
+ variant = "default",
6133
6111
  size = "default",
6134
6112
  open,
6135
6113
  onOpenChange,
@@ -6158,6 +6136,7 @@ function Combobox({
6158
6136
  {
6159
6137
  className: cn(
6160
6138
  comboboxStyles.trigger,
6139
+ triggerVariantStyles[variant],
6161
6140
  formElementSizes[size],
6162
6141
  error && comboboxStyles.triggerError,
6163
6142
  className
@@ -6177,25 +6156,17 @@ function Combobox({
6177
6156
  /* @__PURE__ */ jsx(Combobox$1.Input, { className: comboboxStyles.searchInput, placeholder: searchPlaceholder })
6178
6157
  ] }),
6179
6158
  /* @__PURE__ */ jsx(Combobox$1.Empty, { className: comboboxStyles.empty, children: emptyText }),
6180
- /* @__PURE__ */ jsx(Combobox$1.List, { className: comboboxStyles.list, children: (option) => /* @__PURE__ */ jsxs(
6181
- Combobox$1.Item,
6182
- {
6183
- value: option,
6184
- className: cn(comboboxStyles.item, comboboxStyles.itemSelected),
6185
- children: [
6186
- /* @__PURE__ */ jsx("span", { className: comboboxStyles.checkContainer, children: /* @__PURE__ */ jsx(Combobox$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: comboboxStyles.checkIcon }) }) }),
6187
- /* @__PURE__ */ jsxs("span", { className: comboboxStyles.optionContent, children: [
6188
- option.start,
6189
- /* @__PURE__ */ jsxs("span", { className: comboboxStyles.optionText, children: [
6190
- /* @__PURE__ */ jsx("span", { className: comboboxStyles.optionLabel, children: option.label }),
6191
- option.description && /* @__PURE__ */ jsx("span", { className: comboboxStyles.optionDescription, children: option.description })
6192
- ] }),
6193
- option.end ? /* @__PURE__ */ jsx("div", { className: comboboxStyles.optionEnd, children: option.end }) : null
6194
- ] })
6195
- ]
6196
- },
6197
- option.value
6198
- ) })
6159
+ /* @__PURE__ */ jsx(Combobox$1.List, { className: comboboxStyles.list, children: (option) => /* @__PURE__ */ jsxs(Combobox$1.Item, { value: option, className: comboboxStyles.item, children: [
6160
+ option.start,
6161
+ /* @__PURE__ */ jsxs("span", { className: comboboxStyles.optionText, children: [
6162
+ /* @__PURE__ */ jsx("span", { className: comboboxStyles.optionLabel, children: option.label }),
6163
+ option.description && /* @__PURE__ */ jsx("span", { className: comboboxStyles.optionDescription, children: option.description })
6164
+ ] }),
6165
+ /* @__PURE__ */ jsxs("span", { className: comboboxStyles.itemRightSlot, children: [
6166
+ option.end ? /* @__PURE__ */ jsx("div", { className: comboboxStyles.optionEnd, children: option.end }) : null,
6167
+ /* @__PURE__ */ jsx("span", { className: comboboxStyles.checkContainer, children: /* @__PURE__ */ jsx(Combobox$1.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: comboboxStyles.checkIcon }) }) })
6168
+ ] })
6169
+ ] }, option.value) })
6199
6170
  ] }) }) })
6200
6171
  ]
6201
6172
  }
@@ -6261,7 +6232,7 @@ function MultiCombobox({
6261
6232
  /* @__PURE__ */ jsx(Combobox$1.Empty, { className: comboboxStyles.empty, children: emptyText }),
6262
6233
  /* @__PURE__ */ jsx(Combobox$1.List, { className: comboboxStyles.list, children: (option) => {
6263
6234
  const isSelected = value.includes(option.value);
6264
- return /* @__PURE__ */ jsxs(Combobox$1.Item, { value: option, className: comboboxStyles.item, children: [
6235
+ return /* @__PURE__ */ jsxs(Combobox$1.Item, { value: option, className: comboboxStyles.itemMulti, children: [
6265
6236
  /* @__PURE__ */ jsx(
6266
6237
  "span",
6267
6238
  {
@@ -6529,44 +6500,91 @@ const SelectItem = React.forwardRef(({ className, children, ...props }, ref) =>
6529
6500
  SelectItem.displayName = SelectPrimitive.Item.displayName;
6530
6501
 
6531
6502
  const Tabs = ({ children, defaultTab, value, onValueChange, className }) => {
6532
- const [internalTab, setInternalTab] = useState(defaultTab);
6533
- const isControlled = value !== void 0 && onValueChange !== void 0;
6534
- const currentTab = isControlled ? value : internalTab;
6535
- const handleTabChange = (newValue) => {
6536
- const typedValue = newValue;
6537
- if (isControlled) {
6538
- onValueChange(typedValue);
6539
- } else {
6540
- setInternalTab(typedValue);
6503
+ return /* @__PURE__ */ jsx(
6504
+ Tabs$1.Root,
6505
+ {
6506
+ defaultValue: defaultTab,
6507
+ value,
6508
+ onValueChange: onValueChange ? (next) => onValueChange(next) : void 0,
6509
+ className: cn("overflow-y-auto", className),
6510
+ children
6541
6511
  }
6542
- };
6543
- return /* @__PURE__ */ jsx(RadixTabs.Root, { value: currentTab, onValueChange: handleTabChange, className: cn("overflow-y-auto", className), children });
6512
+ );
6544
6513
  };
6545
6514
 
6546
- const TabList = ({ children, className }) => {
6547
- return /* @__PURE__ */ jsx("div", { className: cn("w-full overflow-x-auto", className), children: /* @__PURE__ */ jsx(
6548
- RadixTabs.List,
6515
+ const tabListVariants = cva("flex items-center relative text-ui-lg", {
6516
+ variants: {
6517
+ variant: {
6518
+ line: "w-max min-w-full border-b border-border1",
6519
+ pill: "w-fit gap-1 rounded-full bg-surface2 p-1",
6520
+ "pill-ghost": "w-fit gap-1 rounded-full p-1"
6521
+ }
6522
+ },
6523
+ defaultVariants: {
6524
+ variant: "line"
6525
+ }
6526
+ });
6527
+ const TabList = ({ children, className, variant, sticky }) => {
6528
+ const resolvedVariant = variant ?? "line";
6529
+ return /* @__PURE__ */ jsx("div", { className: cn("w-full overflow-x-auto", sticky && "sticky top-0 z-10 bg-surface2"), children: /* @__PURE__ */ jsxs(
6530
+ Tabs$1.List,
6549
6531
  {
6550
- className: cn("flex items-center relative w-max min-w-full", "text-ui-lg border-b border-border1", className),
6551
- children
6532
+ "data-variant": resolvedVariant,
6533
+ className: cn("group/tabs-list", tabListVariants({ variant: resolvedVariant }), className),
6534
+ children: [
6535
+ children,
6536
+ resolvedVariant === "line" && /* @__PURE__ */ jsx(
6537
+ Tabs$1.Indicator,
6538
+ {
6539
+ className: cn(
6540
+ "absolute bottom-0 left-0 bg-neutral3",
6541
+ "w-[var(--active-tab-width)] h-0.5",
6542
+ "transition-all duration-200 ease-in-out"
6543
+ ),
6544
+ style: { transform: "translateX(var(--active-tab-left))" }
6545
+ }
6546
+ ),
6547
+ (resolvedVariant === "pill" || resolvedVariant === "pill-ghost") && /* @__PURE__ */ jsx(
6548
+ Tabs$1.Indicator,
6549
+ {
6550
+ className: cn(
6551
+ "absolute top-1/2 left-0 z-0 rounded-full bg-surface4",
6552
+ "w-[var(--active-tab-width)] h-[calc(100%-0.5rem)]",
6553
+ "transition-all duration-200 ease-in-out"
6554
+ ),
6555
+ style: { transform: "translateY(-50%) translateX(var(--active-tab-left))" }
6556
+ }
6557
+ )
6558
+ ]
6552
6559
  }
6553
6560
  ) });
6554
6561
  };
6555
6562
 
6556
6563
  const Tab = ({ children, value, onClick, onClose, disabled, className }) => {
6557
6564
  return /* @__PURE__ */ jsxs(
6558
- RadixTabs.Trigger,
6565
+ Tabs$1.Tab,
6559
6566
  {
6560
6567
  value,
6561
6568
  disabled,
6562
6569
  className: cn(
6563
- "py-2 px-5 text-ui-md font-normal text-neutral3 border-b-2 border-transparent",
6570
+ "text-ui-md font-normal text-neutral3",
6564
6571
  "whitespace-nowrap shrink-0 flex items-center justify-center gap-1.5 outline-none cursor-pointer",
6565
6572
  transitions.colors,
6566
6573
  focusRing.visible,
6567
6574
  "hover:text-neutral4",
6568
- "data-[state=active]:text-neutral5 data-[state=active]:border-neutral3",
6575
+ "data-[active]:text-neutral5",
6569
6576
  "data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 data-[disabled]:hover:text-neutral3",
6577
+ // Line variant (default) — active state drawn by <Tabs.Indicator> in TabList
6578
+ "group-data-[variant=line]/tabs-list:py-2 group-data-[variant=line]/tabs-list:px-5",
6579
+ "group-data-[variant=line]/tabs-list:border-b-2 group-data-[variant=line]/tabs-list:border-transparent",
6580
+ // Pill variant
6581
+ "group-data-[variant=pill]/tabs-list:relative group-data-[variant=pill]/tabs-list:z-10",
6582
+ "group-data-[variant=pill]/tabs-list:py-1 group-data-[variant=pill]/tabs-list:px-3",
6583
+ "group-data-[variant=pill]/tabs-list:rounded-full",
6584
+ // Pill-ghost variant (pill without list background)
6585
+ "group-data-[variant=pill-ghost]/tabs-list:relative group-data-[variant=pill-ghost]/tabs-list:z-10",
6586
+ "group-data-[variant=pill-ghost]/tabs-list:py-1 group-data-[variant=pill-ghost]/tabs-list:px-3",
6587
+ "group-data-[variant=pill-ghost]/tabs-list:rounded-full",
6570
6588
  className
6571
6589
  ),
6572
6590
  onClick,
@@ -6591,7 +6609,7 @@ const Tab = ({ children, value, onClick, onClose, disabled, className }) => {
6591
6609
 
6592
6610
  const TabContent = ({ children, value, className }) => {
6593
6611
  return /* @__PURE__ */ jsx(
6594
- RadixTabs.Content,
6612
+ Tabs$1.Panel,
6595
6613
  {
6596
6614
  value,
6597
6615
  className: cn("grid py-3 overflow-y-auto ring-offset-background", focusRing.visible, className),
@@ -6840,13 +6858,13 @@ function Skeleton({ className, ...props }) {
6840
6858
  }
6841
6859
 
6842
6860
  const EntityHeader = ({ icon, title, isLoading, children }) => {
6843
- return /* @__PURE__ */ jsxs("div", { className: "p-5 w-full overflow-x-hidden", children: [
6844
- /* @__PURE__ */ jsxs("div", { className: "text-neutral6 flex items-center gap-2", children: [
6845
- /* @__PURE__ */ jsx(Icon, { size: "lg", className: "bg-surface4 rounded-md p-1", children: icon }),
6846
- isLoading ? /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-1/3" }) : /* @__PURE__ */ jsx("div", { className: "flex min-w-0 items-center gap-4", children: /* @__PURE__ */ jsx(Txt, { variant: "header-md", as: "h2", className: "truncate font-medium", children: title }) })
6861
+ return /* @__PURE__ */ jsx("div", { className: "p-3 pb-1 w-full overflow-x-hidden", children: /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-3", children: [
6862
+ /* @__PURE__ */ jsxs("div", { className: "text-neutral6 flex min-w-0 items-center gap-2", children: [
6863
+ /* @__PURE__ */ jsx(Icon, { size: "lg", children: icon }),
6864
+ isLoading ? /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-32" }) : /* @__PURE__ */ jsx(Txt, { variant: "header-md", as: "h2", className: "truncate font-medium", children: title })
6847
6865
  ] }),
6848
- children && /* @__PURE__ */ jsx("div", { className: "pt-2", children })
6849
- ] });
6866
+ children
6867
+ ] }) });
6850
6868
  };
6851
6869
 
6852
6870
  function FieldBlockColumn({ children, className }) {
@@ -7184,6 +7202,149 @@ function SelectFieldBlock({
7184
7202
  ] });
7185
7203
  }
7186
7204
 
7205
+ const InputGroupSizeContext = React.createContext("md");
7206
+ const inputGroupClassName = cn(
7207
+ "group/input-group relative flex w-full min-w-0 items-stretch",
7208
+ "bg-surface2 border border-border1 text-neutral6",
7209
+ "hover:border-border2",
7210
+ formElementRadius,
7211
+ formElementFocusWithin,
7212
+ transitions.all,
7213
+ "has-[:disabled]:opacity-50 has-[:disabled]:cursor-not-allowed",
7214
+ "has-[[aria-invalid=true]]:border-error has-[[aria-invalid=true]]:focus-within:ring-error has-[[aria-invalid=true]]:focus-within:shadow-glow-accent2",
7215
+ "has-[>[data-align=block-start]]:flex-col",
7216
+ "has-[>[data-align=block-end]]:flex-col",
7217
+ "has-[>[data-align=inline-start]]:[&>[data-slot=input-group-control]]:pl-0",
7218
+ "has-[>[data-align=inline-end]]:[&>[data-slot=input-group-control]]:pr-0",
7219
+ // In flex-col, flex-1 collapses the input to basis-0. Force flex-none so `h-form-*` applies.
7220
+ "has-[>[data-align=block-start]]:[&>[data-slot=input-group-control]]:flex-none has-[>[data-align=block-start]]:[&>[data-slot=input-group-control]]:w-full",
7221
+ "has-[>[data-align=block-end]]:[&>[data-slot=input-group-control]]:flex-none has-[>[data-align=block-end]]:[&>[data-slot=input-group-control]]:w-full"
7222
+ );
7223
+ const InputGroup = React.forwardRef(({ className, size = "md", ...props }, ref) => {
7224
+ return /* @__PURE__ */ jsx(InputGroupSizeContext.Provider, { value: size, children: /* @__PURE__ */ jsx("div", { ref, role: "group", "data-slot": "input-group", className: cn(inputGroupClassName, className), ...props }) });
7225
+ });
7226
+ InputGroup.displayName = "InputGroup";
7227
+ const inputGroupAddonVariants = cva(
7228
+ cn(
7229
+ "flex items-center justify-center gap-2 text-neutral3 select-none",
7230
+ "group-has-[:disabled]/input-group:opacity-50",
7231
+ "[&>svg:not([class*='size-'])]:size-4"
7232
+ ),
7233
+ {
7234
+ variants: {
7235
+ align: {
7236
+ "inline-start": "order-first pl-3 pr-1 has-[>button]:pl-1",
7237
+ "inline-end": "order-last pr-3 pl-1 has-[>button]:pr-1",
7238
+ "block-start": "order-first w-full justify-start px-3 pt-2 pb-1 border-b border-border1",
7239
+ "block-end": "order-last w-full justify-start px-3 pb-2 pt-1 border-t border-border1"
7240
+ }
7241
+ },
7242
+ defaultVariants: {
7243
+ align: "inline-start"
7244
+ }
7245
+ }
7246
+ );
7247
+ const InputGroupAddon = React.forwardRef(
7248
+ ({ className, align = "inline-start", onClick, ...props }, ref) => {
7249
+ return /* @__PURE__ */ jsx(
7250
+ "div",
7251
+ {
7252
+ ref,
7253
+ role: "group",
7254
+ "data-slot": "input-group-addon",
7255
+ "data-align": align,
7256
+ className: cn(inputGroupAddonVariants({ align }), className),
7257
+ onClick: (event) => {
7258
+ const target = event.target;
7259
+ if (!target.closest('button, input, textarea, [role="button"]')) {
7260
+ event.currentTarget.parentElement?.querySelector("[data-slot=input-group-control]")?.focus();
7261
+ }
7262
+ onClick?.(event);
7263
+ },
7264
+ ...props
7265
+ }
7266
+ );
7267
+ }
7268
+ );
7269
+ InputGroupAddon.displayName = "InputGroupAddon";
7270
+ const inputGroupControlTextSize = {
7271
+ sm: "text-ui-sm",
7272
+ md: "text-ui-md",
7273
+ default: "text-ui-md",
7274
+ lg: "text-ui-lg"
7275
+ };
7276
+ const InputGroupInput = React.forwardRef(
7277
+ ({ className, testId, error, type = "text", ...props }, ref) => {
7278
+ const size = React.useContext(InputGroupSizeContext);
7279
+ return /* @__PURE__ */ jsx(
7280
+ "input",
7281
+ {
7282
+ ref,
7283
+ type,
7284
+ "data-slot": "input-group-control",
7285
+ "data-testid": testId,
7286
+ "aria-invalid": error,
7287
+ className: cn(
7288
+ "flex-1 min-w-0 bg-transparent text-neutral6 px-3 outline-hidden",
7289
+ formElementSizes[size],
7290
+ inputGroupControlTextSize[size],
7291
+ "placeholder:text-neutral2 placeholder:transition-opacity placeholder:duration-normal",
7292
+ "focus:placeholder:opacity-70",
7293
+ "disabled:cursor-not-allowed",
7294
+ className
7295
+ ),
7296
+ ...props
7297
+ }
7298
+ );
7299
+ }
7300
+ );
7301
+ InputGroupInput.displayName = "InputGroupInput";
7302
+ const InputGroupTextarea = React.forwardRef(
7303
+ ({ className, testId, error, ...props }, ref) => {
7304
+ const size = React.useContext(InputGroupSizeContext);
7305
+ return /* @__PURE__ */ jsx(
7306
+ "textarea",
7307
+ {
7308
+ ref,
7309
+ "data-slot": "input-group-control",
7310
+ "data-testid": testId,
7311
+ "aria-invalid": error,
7312
+ className: cn(
7313
+ "flex-1 min-w-0 min-h-[60px] resize-y bg-transparent text-neutral6 px-3 py-2 outline-hidden",
7314
+ inputGroupControlTextSize[size],
7315
+ "placeholder:text-neutral2 placeholder:transition-opacity placeholder:duration-normal",
7316
+ "focus:placeholder:opacity-70",
7317
+ "disabled:cursor-not-allowed",
7318
+ className
7319
+ ),
7320
+ ...props
7321
+ }
7322
+ );
7323
+ }
7324
+ );
7325
+ InputGroupTextarea.displayName = "InputGroupTextarea";
7326
+ const InputGroupText = React.forwardRef(({ className, ...props }, ref) => {
7327
+ return /* @__PURE__ */ jsx(
7328
+ "span",
7329
+ {
7330
+ ref,
7331
+ className: cn(
7332
+ "flex items-center gap-2 text-ui-sm text-neutral3 [&_svg]:pointer-events-none",
7333
+ "[&_svg:not([class*='size-'])]:size-4",
7334
+ className
7335
+ ),
7336
+ ...props
7337
+ }
7338
+ );
7339
+ });
7340
+ InputGroupText.displayName = "InputGroupText";
7341
+ const InputGroupButton = React.forwardRef(
7342
+ ({ size = "icon-sm", variant = "ghost", type = "button", ...props }, ref) => {
7343
+ return /* @__PURE__ */ jsx(Button, { ref, type, size, variant, ...props });
7344
+ }
7345
+ );
7346
+ InputGroupButton.displayName = "InputGroupButton";
7347
+
7187
7348
  const themeClasses = {
7188
7349
  light: "bg-gray-100 border-gray-300 text-gray-700 shadow-[0_1px_0_rgba(0,0,0,0.1)]",
7189
7350
  dark: "bg-surface4 border-border1 text-neutral5 shadow-[0_1px_0_rgba(0,0,0,0.3)]"
@@ -7579,6 +7740,122 @@ function PropertyFilterActions({
7579
7740
  ] });
7580
7741
  }
7581
7742
 
7743
+ const ButtonsGroupOrientationContext = React.createContext("horizontal");
7744
+ const buttonsGroupVariants = cva(
7745
+ // Elevate the focused child's border above its siblings so it isn't clipped in close-spacing.
7746
+ cn("flex", "[&>*:focus-visible]:relative [&>*:focus-visible]:z-10"),
7747
+ {
7748
+ variants: {
7749
+ orientation: {
7750
+ horizontal: "flex-row items-center",
7751
+ vertical: "flex-col items-stretch"
7752
+ },
7753
+ spacing: {
7754
+ default: "gap-2",
7755
+ close: "gap-0"
7756
+ }
7757
+ },
7758
+ compoundVariants: [
7759
+ {
7760
+ orientation: "horizontal",
7761
+ spacing: "close",
7762
+ // Skip separators when collapsing borders so they stay visible.
7763
+ className: cn(
7764
+ "[&>*:not(:last-child)]:rounded-r-none",
7765
+ "[&>*:not(:first-child)]:rounded-l-none",
7766
+ "[&>*:not([data-slot=buttons-group-separator]):not(:first-child)]:-ml-px"
7767
+ )
7768
+ },
7769
+ {
7770
+ orientation: "vertical",
7771
+ spacing: "close",
7772
+ // Children carry `rounded-full` (capsule) which looks awkward when stacked vertically.
7773
+ // Replace the outer corners with a regular `rounded-xl` and flatten the inner ones.
7774
+ className: cn(
7775
+ "[&>*:not(:last-child)]:rounded-b-none",
7776
+ "[&>*:not(:first-child)]:rounded-t-none",
7777
+ "[&>:first-child]:rounded-t-xl",
7778
+ "[&>:last-child]:rounded-b-xl",
7779
+ "[&>*:not([data-slot=buttons-group-separator]):not(:first-child)]:-mt-px"
7780
+ )
7781
+ }
7782
+ ],
7783
+ defaultVariants: {
7784
+ orientation: "horizontal",
7785
+ spacing: "default"
7786
+ }
7787
+ }
7788
+ );
7789
+ const ButtonsGroup = React.forwardRef(
7790
+ ({ children, className, orientation = "horizontal", spacing = "default", ...props }, ref) => {
7791
+ return /* @__PURE__ */ jsx(ButtonsGroupOrientationContext.Provider, { value: orientation, children: /* @__PURE__ */ jsx(
7792
+ "div",
7793
+ {
7794
+ ref,
7795
+ role: "group",
7796
+ "data-slot": "buttons-group",
7797
+ "data-orientation": orientation,
7798
+ className: cn(buttonsGroupVariants({ orientation, spacing }), className),
7799
+ ...props,
7800
+ children
7801
+ }
7802
+ ) });
7803
+ }
7804
+ );
7805
+ ButtonsGroup.displayName = "ButtonsGroup";
7806
+ const ButtonsGroupSeparator = React.forwardRef(
7807
+ ({ className, orientation, ...props }, ref) => {
7808
+ const parentOrientation = React.useContext(ButtonsGroupOrientationContext);
7809
+ const resolved = orientation ?? (parentOrientation === "vertical" ? "horizontal" : "vertical");
7810
+ return /* @__PURE__ */ jsx(
7811
+ "div",
7812
+ {
7813
+ ref,
7814
+ role: "separator",
7815
+ "aria-orientation": resolved,
7816
+ "data-slot": "buttons-group-separator",
7817
+ className: cn("self-stretch bg-border1", resolved === "vertical" ? "w-px" : "h-px", className),
7818
+ ...props
7819
+ }
7820
+ );
7821
+ }
7822
+ );
7823
+ ButtonsGroupSeparator.displayName = "ButtonsGroupSeparator";
7824
+ const buttonsGroupTextVariants = cva(
7825
+ cn(
7826
+ "inline-flex items-center justify-center bg-surface3 border border-border1 text-neutral5 select-none",
7827
+ "rounded-full gap-[.75em] px-[1em] whitespace-nowrap shrink-0",
7828
+ "[&>svg]:w-[1.1em] [&>svg]:h-[1.1em] [&>svg]:opacity-50"
7829
+ ),
7830
+ {
7831
+ variants: {
7832
+ size: {
7833
+ sm: `${formElementSizes.sm} text-ui-sm`,
7834
+ md: `${formElementSizes.md} text-ui-md`,
7835
+ default: `${formElementSizes.default} text-ui-md`,
7836
+ lg: `${formElementSizes.lg} text-ui-lg`
7837
+ }
7838
+ },
7839
+ defaultVariants: {
7840
+ size: "default"
7841
+ }
7842
+ }
7843
+ );
7844
+ const ButtonsGroupText = React.forwardRef(
7845
+ ({ className, size = "default", ...props }, ref) => {
7846
+ return /* @__PURE__ */ jsx(
7847
+ "div",
7848
+ {
7849
+ ref,
7850
+ "data-slot": "buttons-group-text",
7851
+ className: cn(buttonsGroupTextVariants({ size }), className),
7852
+ ...props
7853
+ }
7854
+ );
7855
+ }
7856
+ );
7857
+ ButtonsGroupText.displayName = "ButtonsGroupText";
7858
+
7582
7859
  const RadioGroup = React.forwardRef(({ className, ...props }, ref) => {
7583
7860
  return /* @__PURE__ */ jsx(RadioGroupPrimitive.Root, { className: cn("grid gap-2", className), ...props, ref });
7584
7861
  });
@@ -7717,13 +7994,40 @@ function stringifyTokenValue(value) {
7717
7994
  if (Array.isArray(value)) return value.length === 0 ? "Any" : value.join(", ");
7718
7995
  return value;
7719
7996
  }
7720
- const PILL_CLASS = "inline-flex";
7721
- const SHARED_LABEL_OPERATOR_CLASSES = `${formElementSizes.md} border-y-2 border-border1 px-[.75em] text-neutral3 whitespace-nowrap flex items-center`;
7722
- const LABEL_CLASS = `${SHARED_LABEL_OPERATOR_CLASSES} text-ui-md rounded-l-lg border-l-2 border-r-1`;
7723
- const OPERATOR_CLASS = `${SHARED_LABEL_OPERATOR_CLASSES} text-ui-md `;
7724
- const REMOVE_CLASS = "rounded-tl-none rounded-bl-none border-l-transparent";
7725
- const INPUT_CLASS = "rounded-none";
7726
- const VALUE_BUTTON_CLASS = "rounded-none";
7997
+ const DEFAULT_LOCKED_TOOLTIP = "This filter is set by the current context and cannot be removed here.";
7998
+ function lookupOptionLabel(field, value) {
7999
+ if (field.kind === "pick-multi" && field.options) {
8000
+ if (Array.isArray(value)) {
8001
+ if (value.length === 0) return "Any";
8002
+ return value.map((v) => field.options.find((o) => o.value === v)?.label ?? v).join(", ");
8003
+ }
8004
+ return field.options.find((o) => o.value === value)?.label ?? value;
8005
+ }
8006
+ return stringifyTokenValue(value);
8007
+ }
8008
+ function LockedTokenPill({ field, value, tooltipContent }) {
8009
+ const display = lookupOptionLabel(field, value);
8010
+ const lockA11yLabel = `${field.label} filter is locked by context`;
8011
+ return /* @__PURE__ */ jsx(TooltipProvider, { delayDuration: 150, children: /* @__PURE__ */ jsxs(Tooltip, { children: [
8012
+ /* @__PURE__ */ jsx(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
8013
+ ButtonsGroup,
8014
+ {
8015
+ spacing: "close",
8016
+ "data-locked-field-id": field.id,
8017
+ "data-property-filter-pill": "locked",
8018
+ tabIndex: 0,
8019
+ "aria-label": lockA11yLabel,
8020
+ children: [
8021
+ /* @__PURE__ */ jsx(ButtonsGroupText, { size: "md", children: field.label }),
8022
+ /* @__PURE__ */ jsx(ButtonsGroupText, { size: "md", children: "is" }),
8023
+ /* @__PURE__ */ jsx(ButtonsGroupText, { size: "md", children: display }),
8024
+ /* @__PURE__ */ jsx(ButtonsGroupText, { size: "md", children: /* @__PURE__ */ jsx(LockIcon, {}) })
8025
+ ]
8026
+ }
8027
+ ) }),
8028
+ /* @__PURE__ */ jsx(TooltipContent, { children: tooltipContent })
8029
+ ] }) });
8030
+ }
7727
8031
  function TextTokenPill({ field, value, onChange, onRemove, disabled, autoFocus }) {
7728
8032
  const [draft, setDraft] = useState(value);
7729
8033
  const inputRef = useRef(null);
@@ -7733,9 +8037,9 @@ function TextTokenPill({ field, value, onChange, onRemove, disabled, autoFocus }
7733
8037
  useEffect(() => {
7734
8038
  if (autoFocus) inputRef.current?.focus();
7735
8039
  }, [autoFocus]);
7736
- return /* @__PURE__ */ jsxs("div", { className: PILL_CLASS, children: [
7737
- /* @__PURE__ */ jsx("span", { className: LABEL_CLASS, children: field.label }),
7738
- /* @__PURE__ */ jsx("span", { className: OPERATOR_CLASS, children: "is" }),
8040
+ return /* @__PURE__ */ jsxs(ButtonsGroup, { spacing: "close", children: [
8041
+ /* @__PURE__ */ jsx(ButtonsGroupText, { size: "md", children: field.label }),
8042
+ /* @__PURE__ */ jsx(ButtonsGroupText, { size: "md", children: "is" }),
7739
8043
  /* @__PURE__ */ jsx(
7740
8044
  Input,
7741
8045
  {
@@ -7744,7 +8048,6 @@ function TextTokenPill({ field, value, onChange, onRemove, disabled, autoFocus }
7744
8048
  disabled,
7745
8049
  value: draft,
7746
8050
  placeholder: field.placeholder ?? `Enter ${field.label}`,
7747
- className: INPUT_CLASS,
7748
8051
  onChange: (e) => {
7749
8052
  const next = e.target.value;
7750
8053
  setDraft(next);
@@ -7769,7 +8072,6 @@ function TextTokenPill({ field, value, onChange, onRemove, disabled, autoFocus }
7769
8072
  type: "button",
7770
8073
  disabled,
7771
8074
  "aria-label": `Remove ${field.label} filter`,
7772
- className: REMOVE_CLASS,
7773
8075
  size: "md",
7774
8076
  onMouseDown: (e) => e.preventDefault(),
7775
8077
  onClick: onRemove,
@@ -7780,20 +8082,11 @@ function TextTokenPill({ field, value, onChange, onRemove, disabled, autoFocus }
7780
8082
  }
7781
8083
  function PickMultiTokenPill({ field, token, tokens, onChange, onRemove, disabled }) {
7782
8084
  const [open, setOpen] = useState(false);
7783
- return /* @__PURE__ */ jsxs("div", { className: PILL_CLASS, children: [
7784
- /* @__PURE__ */ jsx("span", { className: LABEL_CLASS, children: field.label }),
7785
- /* @__PURE__ */ jsx("span", { className: OPERATOR_CLASS, children: "is" }),
8085
+ return /* @__PURE__ */ jsxs(ButtonsGroup, { spacing: "close", children: [
8086
+ /* @__PURE__ */ jsx(ButtonsGroupText, { size: "md", children: field.label }),
8087
+ /* @__PURE__ */ jsx(ButtonsGroupText, { size: "md", children: "is" }),
7786
8088
  /* @__PURE__ */ jsxs(Popover, { open, onOpenChange: setOpen, children: [
7787
- /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
7788
- Button,
7789
- {
7790
- type: "button",
7791
- disabled,
7792
- size: "md",
7793
- className: VALUE_BUTTON_CLASS,
7794
- children: stringifyTokenValue(token.value)
7795
- }
7796
- ) }),
8089
+ /* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(Button, { type: "button", disabled, size: "md", children: stringifyTokenValue(token.value) }) }),
7797
8090
  /* @__PURE__ */ jsx(PopoverContent, { align: "start", sideOffset: 8, className: "w-64 p-2", "data-pick-multi-panel": true, children: /* @__PURE__ */ jsx(PickMultiPanel, { field, tokens, onChange }) })
7798
8091
  ] }),
7799
8092
  /* @__PURE__ */ jsx(
@@ -7802,7 +8095,6 @@ function PickMultiTokenPill({ field, token, tokens, onChange, onRemove, disabled
7802
8095
  type: "button",
7803
8096
  disabled,
7804
8097
  "aria-label": `Remove ${field.label} filter`,
7805
- className: REMOVE_CLASS,
7806
8098
  size: "md",
7807
8099
  onClick: onRemove,
7808
8100
  children: /* @__PURE__ */ jsx(XIcon, {})
@@ -7815,9 +8107,12 @@ function PropertyFilterApplied({
7815
8107
  tokens,
7816
8108
  onTokensChange,
7817
8109
  disabled,
7818
- autoFocusFieldId
8110
+ autoFocusFieldId,
8111
+ lockedFieldIds,
8112
+ lockedTooltipContent = DEFAULT_LOCKED_TOOLTIP
7819
8113
  }) {
7820
8114
  if (tokens.length === 0) return null;
8115
+ const lockedSet = new Set(lockedFieldIds ?? []);
7821
8116
  const replaceTokenAt = (index, next) => {
7822
8117
  const copy = [...tokens];
7823
8118
  copy[index] = next;
@@ -7829,6 +8124,17 @@ function PropertyFilterApplied({
7829
8124
  return /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2 flex-wrap", children: tokens.map((token, index) => {
7830
8125
  const field = fields.find((f) => f.id === token.fieldId);
7831
8126
  if (!field) return null;
8127
+ if (lockedSet.has(token.fieldId)) {
8128
+ return /* @__PURE__ */ jsx(
8129
+ LockedTokenPill,
8130
+ {
8131
+ field,
8132
+ value: token.value,
8133
+ tooltipContent: lockedTooltipContent
8134
+ },
8135
+ `${token.fieldId}-${index}`
8136
+ );
8137
+ }
7832
8138
  if (field.kind === "text" && typeof token.value === "string") {
7833
8139
  return /* @__PURE__ */ jsx(
7834
8140
  TextTokenPill,
@@ -7863,10 +8169,10 @@ function PropertyFilterApplied({
7863
8169
  `${token.fieldId}-${index}`
7864
8170
  );
7865
8171
  }
7866
- return /* @__PURE__ */ jsxs("div", { className: PILL_CLASS, children: [
7867
- /* @__PURE__ */ jsx("span", { className: LABEL_CLASS, children: field.label }),
7868
- /* @__PURE__ */ jsx("span", { className: OPERATOR_CLASS, children: "is" }),
7869
- /* @__PURE__ */ jsx("span", { className: "px-2.5 py-1.5 max-w-[20rem] truncate", children: stringifyTokenValue(token.value) }),
8172
+ return /* @__PURE__ */ jsxs(ButtonsGroup, { spacing: "close", children: [
8173
+ /* @__PURE__ */ jsx(ButtonsGroupText, { size: "md", children: field.label }),
8174
+ /* @__PURE__ */ jsx(ButtonsGroupText, { size: "md", children: "is" }),
8175
+ /* @__PURE__ */ jsx(ButtonsGroupText, { size: "md", children: stringifyTokenValue(token.value) }),
7870
8176
  /* @__PURE__ */ jsx(
7871
8177
  Button,
7872
8178
  {
@@ -7874,7 +8180,6 @@ function PropertyFilterApplied({
7874
8180
  disabled,
7875
8181
  size: "md",
7876
8182
  "aria-label": `Remove ${field.label} filter`,
7877
- className: REMOVE_CLASS,
7878
8183
  onClick: () => removeTokenAt(index),
7879
8184
  children: /* @__PURE__ */ jsx(XIcon, {})
7880
8185
  }
@@ -7890,8 +8195,14 @@ function PropertyFilterCreator({
7890
8195
  label = "Add Filter",
7891
8196
  disabled,
7892
8197
  size,
7893
- onStartTextFilter
8198
+ onStartTextFilter,
8199
+ hiddenFieldIds
7894
8200
  }) {
8201
+ const visibleFields = useMemo(() => {
8202
+ if (!hiddenFieldIds || hiddenFieldIds.length === 0) return fields;
8203
+ const hidden = new Set(hiddenFieldIds);
8204
+ return fields.filter((f) => !hidden.has(f.id));
8205
+ }, [fields, hiddenFieldIds]);
7895
8206
  const [open, setOpen] = useState(false);
7896
8207
  const [fieldId, setFieldId] = useState();
7897
8208
  const [textValue, setTextValue] = useState("");
@@ -7907,7 +8218,7 @@ function PropertyFilterCreator({
7907
8218
  useEffect(() => {
7908
8219
  if (!open) setOpenPickMultiFieldId(void 0);
7909
8220
  }, [open]);
7910
- const selectedField = useMemo(() => fields.find((f) => f.id === fieldId), [fields, fieldId]);
8221
+ const selectedField = useMemo(() => visibleFields.find((f) => f.id === fieldId), [visibleFields, fieldId]);
7911
8222
  const singleUseFieldIds = useMemo(() => {
7912
8223
  const ids = /* @__PURE__ */ new Set();
7913
8224
  for (const token of tokens) {
@@ -8027,7 +8338,7 @@ function PropertyFilterCreator({
8027
8338
  else next = current <= 0 ? buttons.length - 1 : current - 1;
8028
8339
  buttons[next]?.focus();
8029
8340
  },
8030
- children: fields.length > 0 ? fields.map((f) => {
8341
+ children: visibleFields.length > 0 ? visibleFields.map((f) => {
8031
8342
  const used = singleUseFieldIds.has(f.id);
8032
8343
  if (f.kind === "pick-multi") {
8033
8344
  return /* @__PURE__ */ jsx(
@@ -8296,30 +8607,34 @@ const useAutoscroll = (ref, { enabled = true }) => {
8296
8607
  }, [enabled, ref]);
8297
8608
  };
8298
8609
 
8299
- function useScrollOverflowAttrs(ref) {
8300
- React.useEffect(() => {
8301
- const el = ref.current;
8302
- if (!el) return;
8303
- const update = () => {
8304
- const { scrollTop, scrollLeft, scrollHeight, scrollWidth, clientHeight, clientWidth } = el;
8305
- el.toggleAttribute("data-overflow-y-start", scrollTop > 0);
8306
- el.toggleAttribute("data-overflow-y-end", scrollTop + clientHeight < scrollHeight - 1);
8307
- el.toggleAttribute("data-overflow-x-start", scrollLeft > 0);
8308
- el.toggleAttribute("data-overflow-x-end", scrollLeft + clientWidth < scrollWidth - 1);
8309
- };
8310
- update();
8311
- el.addEventListener("scroll", update, { passive: true });
8312
- const ro = new ResizeObserver(update);
8313
- ro.observe(el);
8314
- const inner = el.firstElementChild;
8315
- if (inner) ro.observe(inner);
8316
- return () => {
8317
- el.removeEventListener("scroll", update);
8318
- ro.disconnect();
8319
- };
8320
- }, [ref]);
8610
+ function resolveMask(mask, orientation) {
8611
+ if (mask === false) return { top: false, bottom: false, left: false, right: false };
8612
+ const vertical = orientation === "vertical" || orientation === "both";
8613
+ const horizontal = orientation === "horizontal" || orientation === "both";
8614
+ const sides = { top: vertical, bottom: vertical, left: horizontal, right: horizontal };
8615
+ if (mask === true || mask === void 0) return sides;
8616
+ if (mask.y !== void 0) {
8617
+ sides.top = mask.y;
8618
+ sides.bottom = mask.y;
8619
+ }
8620
+ if (mask.x !== void 0) {
8621
+ sides.left = mask.x;
8622
+ sides.right = mask.x;
8623
+ }
8624
+ if (mask.top !== void 0) sides.top = mask.top;
8625
+ if (mask.bottom !== void 0) sides.bottom = mask.bottom;
8626
+ if (mask.left !== void 0) sides.left = mask.left;
8627
+ if (mask.right !== void 0) sides.right = mask.right;
8628
+ return sides;
8629
+ }
8630
+ function maskClasses(sides) {
8631
+ return cn(
8632
+ sides.top && "data-[overflow-y-start]:mask-t-from-[calc(100%-2rem)]",
8633
+ sides.bottom && "data-[overflow-y-end]:mask-b-from-[calc(100%-2rem)]",
8634
+ sides.left && "data-[overflow-x-start]:mask-l-from-[calc(100%-2rem)]",
8635
+ sides.right && "data-[overflow-x-end]:mask-r-from-[calc(100%-2rem)]"
8636
+ );
8321
8637
  }
8322
- const MASK_CLASSES = "data-[overflow-y-start]:mask-t-from-[calc(100%-2rem)] data-[overflow-y-end]:mask-b-from-[calc(100%-2rem)] data-[overflow-x-start]:mask-l-from-[calc(100%-2rem)] data-[overflow-x-end]:mask-r-from-[calc(100%-2rem)]";
8323
8638
  const ScrollArea = React.forwardRef(
8324
8639
  ({
8325
8640
  className,
@@ -8328,46 +8643,58 @@ const ScrollArea = React.forwardRef(
8328
8643
  maxHeight,
8329
8644
  autoScroll = false,
8330
8645
  orientation = "vertical",
8331
- showMask = false,
8646
+ mask,
8647
+ showMask,
8332
8648
  ...props
8333
8649
  }, ref) => {
8334
8650
  const areaRef = React.useRef(null);
8335
8651
  useAutoscroll(areaRef, { enabled: autoScroll });
8336
- useScrollOverflowAttrs(areaRef);
8337
- return /* @__PURE__ */ jsxs(ScrollAreaPrimitive.Root, { ref, className: cn("relative overflow-hidden", className), ...props, children: [
8652
+ const effectiveMask = mask !== void 0 ? mask : showMask;
8653
+ const sides = resolveMask(effectiveMask, orientation);
8654
+ const viewportStyle = {};
8655
+ if (maxHeight) viewportStyle.maxHeight = maxHeight;
8656
+ if (orientation === "vertical") {
8657
+ viewportStyle.overflowX = "hidden";
8658
+ viewportStyle.overflowY = "scroll";
8659
+ } else if (orientation === "horizontal") {
8660
+ viewportStyle.overflowX = "scroll";
8661
+ viewportStyle.overflowY = "hidden";
8662
+ }
8663
+ const contentStyle = orientation === "vertical" ? { minWidth: "0px" } : orientation === "horizontal" ? { minHeight: "0px" } : void 0;
8664
+ return /* @__PURE__ */ jsxs(ScrollArea$1.Root, { ref, className: cn("relative overflow-hidden", className), ...props, children: [
8338
8665
  /* @__PURE__ */ jsx(
8339
- ScrollAreaPrimitive.Viewport,
8666
+ ScrollArea$1.Viewport,
8340
8667
  {
8341
8668
  ref: areaRef,
8342
- className: cn("h-full w-full rounded-[inherit] [&>div]:block!", showMask && MASK_CLASSES, viewPortClassName),
8343
- style: maxHeight ? { maxHeight } : void 0,
8344
- children
8669
+ className: cn("h-full w-full rounded-[inherit]", maskClasses(sides), viewPortClassName),
8670
+ style: viewportStyle,
8671
+ children: /* @__PURE__ */ jsx(ScrollArea$1.Content, { style: contentStyle, children })
8345
8672
  }
8346
8673
  ),
8347
8674
  (orientation === "vertical" || orientation === "both") && /* @__PURE__ */ jsx(ScrollBar, { orientation: "vertical" }),
8348
8675
  (orientation === "horizontal" || orientation === "both") && /* @__PURE__ */ jsx(ScrollBar, { orientation: "horizontal" }),
8349
- orientation === "both" && /* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
8676
+ orientation === "both" && /* @__PURE__ */ jsx(ScrollArea$1.Corner, {})
8350
8677
  ] });
8351
8678
  }
8352
8679
  );
8353
- ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
8680
+ ScrollArea.displayName = "ScrollArea";
8354
8681
  const ScrollBar = React.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
8355
- ScrollAreaPrimitive.ScrollAreaScrollbar,
8682
+ ScrollArea$1.Scrollbar,
8356
8683
  {
8357
8684
  ref,
8358
8685
  orientation,
8359
8686
  className: cn(
8360
- "flex touch-none select-none transition-all duration-normal ease-out-custom",
8361
- "opacity-0 hover:opacity-100 data-[state=visible]:opacity-100",
8687
+ "flex touch-none select-none transition-opacity duration-normal ease-out-custom",
8688
+ "opacity-0 data-[hovering]:opacity-100 data-[scrolling]:opacity-100 data-[scrolling]:duration-0",
8362
8689
  orientation === "vertical" && "h-full w-1.5 p-px",
8363
8690
  orientation === "horizontal" && "h-1.5 w-full flex-col p-px",
8364
8691
  className
8365
8692
  ),
8366
8693
  ...props,
8367
- children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-neutral4/30 hover:bg-neutral4/60 transition-colors duration-normal" })
8694
+ children: /* @__PURE__ */ jsx(ScrollArea$1.Thumb, { className: "relative flex-1 rounded-full bg-neutral4/30 hover:bg-neutral4/60 transition-colors duration-normal" })
8368
8695
  }
8369
8696
  ));
8370
- ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
8697
+ ScrollBar.displayName = "ScrollBar";
8371
8698
 
8372
8699
  const searchbarSizeClasses = {
8373
8700
  sm: formElementSizes.sm,
@@ -8664,22 +8991,6 @@ function Truncate({
8664
8991
  ] });
8665
8992
  }
8666
8993
 
8667
- function ButtonsGroup({ children, className, spacing = "default" }) {
8668
- return /* @__PURE__ */ jsx(
8669
- "div",
8670
- {
8671
- className: cn(
8672
- `flex gap-2 items-center`,
8673
- {
8674
- "gap-0 [&>*:not(:last-child)]:rounded-r-none [&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:-ml-px": spacing === "close"
8675
- },
8676
- className
8677
- ),
8678
- children
8679
- }
8680
- );
8681
- }
8682
-
8683
8994
  function MainContentLayout({
8684
8995
  children,
8685
8996
  className,
@@ -10229,7 +10540,7 @@ function MainSidebarNav({
10229
10540
  className,
10230
10541
  ...props
10231
10542
  }) {
10232
- return /* @__PURE__ */ jsx("nav", { "aria-label": ariaLabel, className: cn("flex flex-col flex-1 min-h-0", className), ...props, children: /* @__PURE__ */ jsx(ScrollArea, { showMask: true, className: "flex-1 min-h-0", children }) });
10543
+ return /* @__PURE__ */ jsx("nav", { "aria-label": ariaLabel, className: cn("flex flex-col flex-1 min-h-0", className), ...props, children: /* @__PURE__ */ jsx(ScrollArea, { className: "flex-1 min-h-0", children }) });
10233
10544
  }
10234
10545
 
10235
10546
  function MainSidebarNavSeparator({ className, ...props }) {
@@ -15621,29 +15932,20 @@ const PanelSeparator = () => {
15621
15932
  "group/separator relative w-0 bg-transparent z-10",
15622
15933
  "focus:outline-hidden focus-visible:outline-hidden"
15623
15934
  ),
15624
- children: /* @__PURE__ */ jsx(
15935
+ children: /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: cn("absolute inset-y-0 -left-1 -right-1", "cursor-col-resize touch-none"), children: /* @__PURE__ */ jsx(
15625
15936
  "span",
15626
15937
  {
15627
- "aria-hidden": true,
15628
15938
  className: cn(
15629
- "absolute inset-y-0 -left-1 -right-1 flex items-center justify-center",
15630
- "cursor-col-resize touch-none"
15631
- ),
15632
- children: /* @__PURE__ */ jsx(
15633
- "span",
15634
- {
15635
- className: cn(
15636
- "block h-full w-px bg-border1 pointer-events-none",
15637
- "transition-[width,background-color] duration-150 ease-out motion-reduce:transition-none",
15638
- "group-hover/separator:w-0.5 group-hover/separator:bg-surface5",
15639
- "group-data-[separator='hover']/separator:w-0.5 group-data-[separator='hover']/separator:bg-surface5",
15640
- "group-data-[separator='active']/separator:w-0.5 group-data-[separator='active']/separator:bg-accent1",
15641
- "group-focus-visible/separator:w-0.5 group-focus-visible/separator:bg-accent1"
15642
- )
15643
- }
15939
+ "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",
15940
+ "h-10 w-0.5 bg-surface5 pointer-events-none rounded-full",
15941
+ "transition-all duration-150 ease-out motion-reduce:transition-none",
15942
+ "group-hover/separator:h-12 group-hover/separator:w-1 group-hover/separator:bg-surface5",
15943
+ "group-data-[separator='hover']/separator:h-12 group-data-[separator='hover']/separator:w-1 group-data-[separator='hover']/separator:bg-surface5",
15944
+ "group-data-[separator='active']/separator:h-12 group-data-[separator='active']/separator:w-1 group-data-[separator='active']/separator:bg-accent1",
15945
+ "group-focus-visible/separator:h-12 group-focus-visible/separator:w-1 group-focus-visible/separator:bg-accent1"
15644
15946
  )
15645
15947
  }
15646
- )
15948
+ ) })
15647
15949
  }
15648
15950
  );
15649
15951
  };
@@ -17659,6 +17961,7 @@ const TRACE_SYNTHETIC_FILTER_FIELD_IDS = ["rootEntityType", "status"];
17659
17961
  const TRACE_ROOT_ENTITY_TYPE_PARAM = "rootEntityType";
17660
17962
  const TRACE_STATUS_PARAM = "status";
17661
17963
  const TRACE_LIST_MODE_PARAM = "listMode";
17964
+ const TRACE_ANCHOR_SPAN_ID_PARAM = "anchorSpanId";
17662
17965
  const TRACE_LIST_MODE_VALUES = /* @__PURE__ */ new Set(["traces", "branches"]);
17663
17966
  const TRACE_DATE_PRESET_PARAM = "datePreset";
17664
17967
  const TRACE_DATE_FROM_PARAM = "dateFrom";
@@ -18144,7 +18447,7 @@ function useDrilldown() {
18144
18447
  return { getTracesHref, getLogsHref, getBucketTracesHref };
18145
18448
  }
18146
18449
 
18147
- const formatHierarchicalSpans = (spans) => {
18450
+ const formatHierarchicalSpans = (spans, anchorSpanId) => {
18148
18451
  if (!spans || spans.length === 0) {
18149
18452
  return [];
18150
18453
  }
@@ -18172,9 +18475,10 @@ const formatHierarchicalSpans = (spans) => {
18172
18475
  };
18173
18476
  spanMap.set(spanRecord.spanId, uiSpan);
18174
18477
  });
18478
+ const isAnchor = (spanRecord) => anchorSpanId ? spanRecord.spanId === anchorSpanId : spanRecord?.parentSpanId == null;
18175
18479
  spans.forEach((spanRecord) => {
18176
18480
  const uiSpan = spanMap.get(spanRecord.spanId);
18177
- if (spanRecord?.parentSpanId == null) {
18481
+ if (isAnchor(spanRecord)) {
18178
18482
  if (overallEndDate && uiSpan.endTime && overallEndDate > new Date(uiSpan.endTime)) {
18179
18483
  uiSpan.endTime = overallEndDate.toISOString();
18180
18484
  const overallEndTime = new Date(overallEndDate).getTime();
@@ -18183,7 +18487,7 @@ const formatHierarchicalSpans = (spans) => {
18183
18487
  }
18184
18488
  rootSpans.push(uiSpan);
18185
18489
  } else {
18186
- const parent = spanMap.get(spanRecord.parentSpanId);
18490
+ const parent = spanRecord.parentSpanId ? spanMap.get(spanRecord.parentSpanId) : void 0;
18187
18491
  if (parent) {
18188
18492
  parent.spans.push(uiSpan);
18189
18493
  } else {
@@ -18896,10 +19200,15 @@ function TracesToolbar({
18896
19200
  filterFields,
18897
19201
  filterTokens,
18898
19202
  onFilterTokensChange,
18899
- autoFocusFilterFieldId
19203
+ autoFocusFilterFieldId,
19204
+ lockedFieldIds,
19205
+ lockedTooltipContent
18900
19206
  }) {
18901
19207
  const hasActiveFilters = filterTokens.length > 0;
18902
- const hasNonDefaultFilter = filterTokens.some((token) => isNonDefaultFilter$1(token, filterFields));
19208
+ const lockedSet = new Set(lockedFieldIds ?? []);
19209
+ const editableTokens = filterTokens.filter((t) => !lockedSet.has(t.fieldId));
19210
+ const hasNonDefaultFilter = editableTokens.some((token) => isNonDefaultFilter$1(token, filterFields));
19211
+ const hasEditableFilters = editableTokens.length > 0;
18903
19212
  return (
18904
19213
  // 1fr | auto — pills wrap in the first column; Clear stays pinned to the
18905
19214
  // top of the second column regardless of how many pill rows render.
@@ -18911,10 +19220,12 @@ function TracesToolbar({
18911
19220
  tokens: filterTokens,
18912
19221
  onTokensChange: onFilterTokensChange,
18913
19222
  disabled: isLoading,
18914
- autoFocusFieldId: autoFocusFilterFieldId
19223
+ autoFocusFieldId: autoFocusFilterFieldId,
19224
+ lockedFieldIds,
19225
+ lockedTooltipContent
18915
19226
  }
18916
19227
  ),
18917
- hasActiveFilters && /* @__PURE__ */ jsx(
19228
+ hasActiveFilters && hasEditableFilters && /* @__PURE__ */ jsx(
18918
19229
  PropertyFilterActions,
18919
19230
  {
18920
19231
  disabled: isLoading,
@@ -18959,7 +19270,8 @@ function TraceDataPanelView({
18959
19270
  placement,
18960
19271
  timelineChartWidth = "default",
18961
19272
  LinkComponent,
18962
- traceHref
19273
+ traceHref,
19274
+ anchorSpanId
18963
19275
  }) {
18964
19276
  const isOnTracePage = placement === "trace-page";
18965
19277
  const [internalCollapsed, setInternalCollapsed] = useState(false);
@@ -18988,14 +19300,17 @@ function TraceDataPanelView({
18988
19300
  const el = contentRef.current.querySelector(`[data-span-id="${selectedSpanId}"]`);
18989
19301
  el?.scrollIntoView({ block: "nearest" });
18990
19302
  }, [selectedSpanId]);
18991
- const hierarchicalSpans = useMemo(() => formatHierarchicalSpans(spans ?? []), [spans]);
19303
+ const hierarchicalSpans = useMemo(() => formatHierarchicalSpans(spans ?? [], anchorSpanId), [spans, anchorSpanId]);
18992
19304
  const [expandedSpanIds, setExpandedSpanIds] = useState([]);
18993
19305
  useEffect(() => {
18994
19306
  if (hierarchicalSpans.length > 0) {
18995
19307
  setExpandedSpanIds(getAllSpanIds(hierarchicalSpans));
18996
19308
  }
18997
19309
  }, [hierarchicalSpans]);
18998
- const rootSpan = useMemo(() => spans?.find((s) => s.parentSpanId == null), [spans]);
19310
+ const rootSpan = useMemo(
19311
+ () => anchorSpanId ? spans?.find((s) => s.spanId === anchorSpanId) : spans?.find((s) => s.parentSpanId == null),
19312
+ [spans, anchorSpanId]
19313
+ );
18999
19314
  const handleSpanClick = (id) => {
19000
19315
  const newId = selectedSpanId === id ? void 0 : id;
19001
19316
  setSelectedSpanId(newId);
@@ -19160,7 +19475,8 @@ function SpanDataPanelView({
19160
19475
  scoringTabSlot,
19161
19476
  scoringTabBadge,
19162
19477
  feedbackTabSlot,
19163
- feedbackTabBadge
19478
+ feedbackTabBadge,
19479
+ isAnchor
19164
19480
  }) {
19165
19481
  return /* @__PURE__ */ jsxs(DataPanel, { children: [
19166
19482
  /* @__PURE__ */ jsxs(DataPanel.Header, { children: [
@@ -19195,7 +19511,8 @@ function SpanDataPanelView({
19195
19511
  scoringTabSlot,
19196
19512
  scoringTabBadge,
19197
19513
  feedbackTabSlot,
19198
- feedbackTabBadge
19514
+ feedbackTabBadge,
19515
+ isAnchor
19199
19516
  }
19200
19517
  )
19201
19518
  ] });
@@ -19209,7 +19526,8 @@ function SpanDataPanelContent({
19209
19526
  scoringTabSlot,
19210
19527
  scoringTabBadge,
19211
19528
  feedbackTabSlot,
19212
- feedbackTabBadge
19529
+ feedbackTabBadge,
19530
+ isAnchor
19213
19531
  }) {
19214
19532
  const durationMs = span.startedAt && span.endedAt ? new Date(span.endedAt).getTime() - new Date(span.startedAt).getTime() : null;
19215
19533
  const usage = span.attributes?.usage;
@@ -19217,7 +19535,7 @@ function SpanDataPanelContent({
19217
19535
  isTokenLimitExceeded(span) && /* @__PURE__ */ jsx("div", { className: "mb-3", children: /* @__PURE__ */ jsx(Notice, { variant: "warning", title: "Token Limit Exceeded", children: /* @__PURE__ */ jsx(Notice.Message, { children: getTokenLimitMessage(span) }) }) }),
19218
19536
  usage && /* @__PURE__ */ jsx(SpanTokenUsage, { usage, className: "mb-3" }),
19219
19537
  /* @__PURE__ */ jsxs(DataKeysAndValues, { children: [
19220
- span.parentSpanId == null && /* @__PURE__ */ jsxs(Fragment, { children: [
19538
+ (isAnchor ?? span.parentSpanId == null) && /* @__PURE__ */ jsxs(Fragment, { children: [
19221
19539
  span.traceId && /* @__PURE__ */ jsxs(Fragment, { children: [
19222
19540
  /* @__PURE__ */ jsx(DataKeysAndValues.Key, { children: "Trace Id" }),
19223
19541
  /* @__PURE__ */ jsx(DataKeysAndValues.ValueWithCopyBtn, { copyTooltip: "Copy Trace Id to clipboard", copyValue: span.traceId, children: span.traceId })
@@ -19569,6 +19887,7 @@ function TracesListView({
19569
19887
  setEndOfListElement,
19570
19888
  filtersApplied,
19571
19889
  featuredTraceId,
19890
+ featuredSpanId,
19572
19891
  onTraceClick,
19573
19892
  groupByThread,
19574
19893
  threadTitles
@@ -19577,7 +19896,7 @@ function TracesListView({
19577
19896
  const items = useMemo(() => {
19578
19897
  if (traces.length === 0) return [];
19579
19898
  if (!groupByThread) {
19580
- return traces.map((trace) => ({ kind: "row", key: trace.traceId, trace }));
19899
+ return traces.map((trace) => ({ kind: "row", key: `${trace.traceId}:${trace.spanId ?? ""}`, trace }));
19581
19900
  }
19582
19901
  const { groups, ungrouped } = groupTracesByThread(traces);
19583
19902
  const result = [];
@@ -19604,7 +19923,7 @@ function TracesListView({
19604
19923
  ] })
19605
19924
  });
19606
19925
  for (const trace of group.traces) {
19607
- result.push({ kind: "row", key: trace.traceId, trace });
19926
+ result.push({ kind: "row", key: `${trace.traceId}:${trace.spanId ?? ""}`, trace });
19608
19927
  }
19609
19928
  }
19610
19929
  if (ungrouped.length > 0) {
@@ -19621,7 +19940,7 @@ function TracesListView({
19621
19940
  ] })
19622
19941
  });
19623
19942
  for (const trace of ungrouped) {
19624
- result.push({ kind: "row", key: trace.traceId, trace });
19943
+ result.push({ kind: "row", key: `${trace.traceId}:${trace.spanId ?? ""}`, trace });
19625
19944
  }
19626
19945
  }
19627
19946
  return result;
@@ -19670,7 +19989,7 @@ function TracesListView({
19670
19989
  return /* @__PURE__ */ jsx(TracesDataList.Subheader, { ref: virtualizer.measureElement, "data-index": vi.index, children: item.node }, item.key);
19671
19990
  }
19672
19991
  const trace = item.trace;
19673
- const isFeatured = trace.traceId === featuredTraceId;
19992
+ const isFeatured = trace.traceId === featuredTraceId && (featuredSpanId == null || trace.spanId === featuredSpanId);
19674
19993
  const displayDate = trace.startedAt ?? trace.createdAt;
19675
19994
  const entityName = trace.entityName || trace.entityId || trace.attributes?.agentId || trace.attributes?.workflowId;
19676
19995
  return /* @__PURE__ */ jsxs(
@@ -19706,6 +20025,23 @@ function TracesListView({
19706
20025
  ] });
19707
20026
  }
19708
20027
 
20028
+ const TRACES_LIST_MODE_LABELS = {
20029
+ traces: "Top-level traces only",
20030
+ branches: "All traces, nested too"
20031
+ };
20032
+ function TracesListModeToggle({ value, onChange, disabled }) {
20033
+ return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
20034
+ /* @__PURE__ */ jsx(DropdownMenu.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(Button, { size: "md", variant: "default", disabled, children: [
20035
+ TRACES_LIST_MODE_LABELS[value],
20036
+ /* @__PURE__ */ jsx(ChevronDownIcon, {})
20037
+ ] }) }),
20038
+ /* @__PURE__ */ jsx(DropdownMenu.Content, { align: "start", children: /* @__PURE__ */ jsxs(DropdownMenu.RadioGroup, { value, onValueChange: (v) => onChange(v), children: [
20039
+ /* @__PURE__ */ jsx(DropdownMenu.RadioItem, { value: "traces", children: TRACES_LIST_MODE_LABELS.traces }),
20040
+ /* @__PURE__ */ jsx(DropdownMenu.RadioItem, { value: "branches", children: TRACES_LIST_MODE_LABELS.branches })
20041
+ ] }) })
20042
+ ] });
20043
+ }
20044
+
19709
20045
  function TracesErrorContent({ error, resource, errorTitle }) {
19710
20046
  if (is401UnauthorizedError(error)) return /* @__PURE__ */ jsx(SessionExpired, {});
19711
20047
  if (is403ForbiddenError(error)) return /* @__PURE__ */ jsx(PermissionDenied, { resource });
@@ -19772,6 +20108,26 @@ const NoTracesInfo = ({ datePreset, dateFrom, dateTo } = {}) => {
19772
20108
  ) });
19773
20109
  };
19774
20110
 
20111
+ const IMMUTABLE_CACHE_TIME$2 = 1e3 * 60 * 60 * 24 * 30;
20112
+ function useBranch({ traceId, spanId, depth }) {
20113
+ const client = useMastraClient();
20114
+ return useQuery({
20115
+ queryKey: ["branch", traceId, spanId, depth],
20116
+ queryFn: async () => {
20117
+ if (!traceId || !spanId) {
20118
+ throw new Error("traceId and spanId are required");
20119
+ }
20120
+ return client.getBranch({ traceId, spanId, depth });
20121
+ },
20122
+ enabled: !!traceId && !!spanId,
20123
+ staleTime: (query) => {
20124
+ const data = query.state.data;
20125
+ const isFinished = data?.spans.every((s) => Boolean(s.endedAt));
20126
+ return isFinished ? IMMUTABLE_CACHE_TIME$2 : 0;
20127
+ }
20128
+ });
20129
+ }
20130
+
19775
20131
  const IMMUTABLE_CACHE_TIME$1 = 1e3 * 60 * 60 * 24 * 30;
19776
20132
  function useSpanDetail(traceId, spanId) {
19777
20133
  const client = useMastraClient();
@@ -19818,6 +20174,37 @@ function useTraceLightSpans(traceId) {
19818
20174
  });
19819
20175
  }
19820
20176
 
20177
+ function useTraceOrBranchSpans({
20178
+ traceId,
20179
+ anchorSpanId,
20180
+ listMode,
20181
+ depth
20182
+ }) {
20183
+ const isBranches = listMode === "branches";
20184
+ const traceQuery = useTraceLightSpans(isBranches ? null : traceId);
20185
+ const branchQuery = useBranch({
20186
+ traceId: isBranches ? traceId : null,
20187
+ spanId: isBranches ? anchorSpanId : null,
20188
+ depth
20189
+ });
20190
+ if (isBranches) {
20191
+ return {
20192
+ spans: branchQuery.data?.spans,
20193
+ anchorSpanId: anchorSpanId ?? void 0,
20194
+ isLoading: branchQuery.isLoading,
20195
+ isError: branchQuery.isError,
20196
+ error: branchQuery.error
20197
+ };
20198
+ }
20199
+ return {
20200
+ spans: traceQuery.data?.spans,
20201
+ anchorSpanId: void 0,
20202
+ isLoading: traceQuery.isLoading,
20203
+ isError: traceQuery.isError,
20204
+ error: traceQuery.error
20205
+ };
20206
+ }
20207
+
19821
20208
  function useTraceSpans(traceId) {
19822
20209
  const client = useMastraClient();
19823
20210
  return useQuery({
@@ -19838,7 +20225,7 @@ const fetchTracesFn = async ({
19838
20225
  page,
19839
20226
  perPage,
19840
20227
  filters,
19841
- listMode = "traces"
20228
+ listMode = "branches"
19842
20229
  }) => {
19843
20230
  const params = {
19844
20231
  pagination: {
@@ -19879,7 +20266,7 @@ function selectUniqueTraces(data) {
19879
20266
  }
19880
20267
  return { spans, threadTitles };
19881
20268
  }
19882
- const useTraces = ({ filters, listMode = "traces" }) => {
20269
+ const useTraces = ({ filters, listMode = "branches" }) => {
19883
20270
  const client = useMastraClient();
19884
20271
  const { inView: isEndOfListInView, setRef: setEndOfListElement } = useInView();
19885
20272
  const query = useInfiniteQuery({
@@ -19991,13 +20378,17 @@ function useTraceSpanNavigation(lightSpans, featuredSpanId, onSpanChange) {
19991
20378
  return { handlePreviousSpan, handleNextSpan, timelineSpanIds };
19992
20379
  }
19993
20380
 
19994
- function useTraceListNavigation(traces, featuredTraceId, onTraceChange) {
20381
+ function useTraceListNavigation(traces, featuredTraceId, featuredSpanId, onTraceChange) {
19995
20382
  const featuredTraceIdx = useMemo(
19996
- () => featuredTraceId ? traces.findIndex((t) => t.traceId === featuredTraceId) : -1,
19997
- [traces, featuredTraceId]
20383
+ () => featuredTraceId ? traces.findIndex(
20384
+ (t) => t.traceId === featuredTraceId && (featuredSpanId == null || t.spanId === featuredSpanId)
20385
+ ) : -1,
20386
+ [traces, featuredTraceId, featuredSpanId]
19998
20387
  );
19999
- const handlePreviousTrace = featuredTraceIdx > 0 ? () => onTraceChange(traces[featuredTraceIdx - 1].traceId) : void 0;
20000
- const handleNextTrace = featuredTraceIdx >= 0 && featuredTraceIdx < traces.length - 1 ? () => onTraceChange(traces[featuredTraceIdx + 1].traceId) : void 0;
20388
+ const passSpanId = featuredSpanId != null;
20389
+ const navigateTo = (row) => onTraceChange(row.traceId, passSpanId ? row.spanId ?? void 0 : void 0);
20390
+ const handlePreviousTrace = featuredTraceIdx > 0 ? () => navigateTo(traces[featuredTraceIdx - 1]) : void 0;
20391
+ const handleNextTrace = featuredTraceIdx >= 0 && featuredTraceIdx < traces.length - 1 ? () => navigateTo(traces[featuredTraceIdx + 1]) : void 0;
20001
20392
  return { featuredTraceIdx, handlePreviousTrace, handleNextTrace };
20002
20393
  }
20003
20394
 
@@ -20016,6 +20407,7 @@ const PRESET_MS$1 = {
20016
20407
  function clearSelectionParams$1(params) {
20017
20408
  params.delete(TRACE_ID_PARAM);
20018
20409
  params.delete(SPAN_ID_PARAM);
20410
+ params.delete(TRACE_ANCHOR_SPAN_ID_PARAM);
20019
20411
  params.delete(TAB_PARAM);
20020
20412
  params.delete(SCORE_ID_PARAM);
20021
20413
  }
@@ -20046,12 +20438,13 @@ function useTraceUrlState(searchParams, setSearchParams, options) {
20046
20438
  datePresetRef.current = datePreset;
20047
20439
  const traceIdParam = searchParams.get(TRACE_ID_PARAM) || void 0;
20048
20440
  const spanIdParam = searchParams.get(SPAN_ID_PARAM) || void 0;
20441
+ const anchorSpanIdParam = searchParams.get(TRACE_ANCHOR_SPAN_ID_PARAM) || void 0;
20049
20442
  const tabParam = searchParams.get(TAB_PARAM);
20050
20443
  const spanTabParam = tabParam === "scoring" ? "scoring" : tabParam === "feedback" ? "feedback" : tabParam === "details" ? "details" : void 0;
20051
20444
  const scoreIdParam = searchParams.get(SCORE_ID_PARAM) || void 0;
20052
20445
  const listMode = useMemo(() => {
20053
20446
  const value = searchParams.get(TRACE_LIST_MODE_PARAM);
20054
- return value && TRACE_LIST_MODE_VALUES.has(value) ? value : "traces";
20447
+ return value && TRACE_LIST_MODE_VALUES.has(value) ? value : "branches";
20055
20448
  }, [searchParams]);
20056
20449
  const selectedEntityOption = useMemo(
20057
20450
  () => ROOT_ENTITY_TYPE_OPTIONS.find((option) => option.entityType === searchParams.get(TRACE_ROOT_ENTITY_TYPE_PARAM)),
@@ -20063,7 +20456,7 @@ function useTraceUrlState(searchParams, setSearchParams, options) {
20063
20456
  }, [searchParams]);
20064
20457
  const filterTokens = useMemo(() => getTracePropertyFilterTokens(searchParams), [searchParams]);
20065
20458
  const handleTraceClick = useCallback(
20066
- (traceId) => {
20459
+ (traceId, spanId, anchorSpanId) => {
20067
20460
  setSearchParams(
20068
20461
  (prev) => {
20069
20462
  const next = new URLSearchParams(prev);
@@ -20072,7 +20465,16 @@ function useTraceUrlState(searchParams, setSearchParams, options) {
20072
20465
  } else {
20073
20466
  next.delete(TRACE_ID_PARAM);
20074
20467
  }
20075
- next.delete(SPAN_ID_PARAM);
20468
+ if (spanId) {
20469
+ next.set(SPAN_ID_PARAM, spanId);
20470
+ } else {
20471
+ next.delete(SPAN_ID_PARAM);
20472
+ }
20473
+ if (anchorSpanId) {
20474
+ next.set(TRACE_ANCHOR_SPAN_ID_PARAM, anchorSpanId);
20475
+ } else {
20476
+ next.delete(TRACE_ANCHOR_SPAN_ID_PARAM);
20477
+ }
20076
20478
  next.delete(TAB_PARAM);
20077
20479
  next.delete(SCORE_ID_PARAM);
20078
20480
  return next;
@@ -20204,6 +20606,24 @@ function useTraceUrlState(searchParams, setSearchParams, options) {
20204
20606
  },
20205
20607
  [setSearchParams]
20206
20608
  );
20609
+ const handleListModeChange = useCallback(
20610
+ (mode) => {
20611
+ setSearchParams(
20612
+ (prev) => {
20613
+ const next = new URLSearchParams(prev);
20614
+ if (mode === "branches") {
20615
+ next.delete(TRACE_LIST_MODE_PARAM);
20616
+ } else {
20617
+ next.set(TRACE_LIST_MODE_PARAM, mode);
20618
+ }
20619
+ clearSelectionParams$1(next);
20620
+ return next;
20621
+ },
20622
+ { replace: true }
20623
+ );
20624
+ },
20625
+ [setSearchParams]
20626
+ );
20207
20627
  const handleRemoveAll = useCallback(() => {
20208
20628
  setSearchParams(
20209
20629
  (prev) => {
@@ -20230,6 +20650,7 @@ function useTraceUrlState(searchParams, setSearchParams, options) {
20230
20650
  datePresetRef,
20231
20651
  traceIdParam,
20232
20652
  spanIdParam,
20653
+ anchorSpanIdParam,
20233
20654
  spanTabParam,
20234
20655
  scoreIdParam,
20235
20656
  listMode,
@@ -20242,6 +20663,7 @@ function useTraceUrlState(searchParams, setSearchParams, options) {
20242
20663
  handleSpanClose,
20243
20664
  handleSpanTabChange,
20244
20665
  handleScoreChange,
20666
+ handleListModeChange,
20245
20667
  handleFilterTokensChange,
20246
20668
  handleDateChange,
20247
20669
  handleDatePresetChange,
@@ -21005,5 +21427,5 @@ function useLogsListNavigation(logs, featuredLogId, onFeaturedChange, featuredTr
21005
21427
  };
21006
21428
  }
21007
21429
 
21008
- export { AddField, AgentCoinIcon, AgentIcon, AgentNetworkCoinIcon, AiIcon, AlertDialog, AmazonIcon, AnthropicChatIcon, AnthropicMessagesIcon, ApiIcon, Avatar, AzureIcon, Badge, BarListContent, BorderColors, BorderRadius, BranchIcon, BrandLoader, Breadcrumb, Button, ButtonWithTooltip, ButtonsGroup, CHART_COLORS, CONTEXT_FIELD_IDS, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardTitle, Cell, CheckIcon, Checkbox, ChevronIcon, Chip, ChipsGroup, CodeBlock$1 as CodeBlock, CodeDiff, CodeEditor, CohereIcon, Collapsible, CollapsibleContent, CollapsiblePanel, CollapsibleTrigger, Colors, Column, Columns, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CommitIcon, ContentBlock, ContentBlocks, CopyButton, CrossIcon, Crumb, DATE_PRESETS, DEFAULT_LOGS_FILTERS_STORAGE_KEY, DEFAULT_TRACE_FILTERS_STORAGE_KEY, DashboardCard, DataCodeSection, DataDetailsPanel, DataKeysAndValues, DataList, DataListSkeleton, DataPanel, DatePicker, DateRangeSelector, DateTimeCell, DateTimePicker, DateTimePickerContent, DateTimeRangePicker, DbIcon, DebugIcon, DefaultTrigger, DeploymentIcon, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DividerIcon, DocsIcon, DropdownMenu, EXTENSION_TO_MIME, ElementSelect, EmptyState, Entity, EntityContent, EntityDescription, EntityHeader, EntityIcon, EntityList, EntityListPageLayout, EntityListSkeleton, EntityName, Entry, EntryCell, EntryList, EntryListSkeleton, EnvIcon, ErrorBoundary, ErrorState, Field, FieldBlock, FieldBlocksLayout, FieldDescription, FieldList, FieldName, FieldNullable, FieldOptional, FieldRemove, FieldType, FiltersIcon, FolderIcon, FontSizes, GithubCoinIcon, GithubIcon, Glows, GoogleIcon, GroqIcon, Header$1 as Header, HeaderAction, HeaderGroup, HeaderTitle, HomeIcon, HorizontalBars, HoverPopover, Icon, InfoIcon, Input, ItemList, ItemListSkeleton, JSONSchemaForm, JudgeIcon, Kbd, KeyValueList, KpiCardView, LOGS_DATE_FROM_PARAM, LOGS_DATE_PRESET_PARAM, LOGS_DATE_PRESET_VALUES, LOGS_DATE_TO_PARAM, LOGS_PROPERTY_FILTER_FIELD_IDS, LOGS_PROPERTY_FILTER_PARAM_BY_FIELD, LOGS_ROOT_ENTITY_TYPES, LOGS_ROOT_ENTITY_TYPE_OPTIONS, LOGS_ROOT_ENTITY_TYPE_PARAM, LOG_LEVEL_OPTIONS, LOG_LEVEL_VALUES, Label, LatencyCardView, LatencyIcon, LineHeights, ListSearch, LogDetailsView, Logo, LogoWithoutText, LogsDataList, DataListSkeleton as LogsDataListSkeleton, LogsErrorContent, LogsIcon, LogsLayout, LogsListView, LogsToolbar, MainContentContent, MainContentLayout, MainHeader, MainSidebar, MainSidebarMobileTrigger, MainSidebarProvider, MainSidebarTrigger, MarkdownRenderer, MastraIcon, McpCoinIcon, McpServerIcon, MemoryCardView, MemoryIcon, MetricsCard, MetricsDataTable, MetricsFlexGrid, MetricsKpiCard, MetricsLineChart, MetricsLineChartTooltip, MetricsProvider, MistralIcon, ModelUsageCostCardView, MultiColumn, MultiCombobox, NestedFields, NetlifyIcon, NoDataPageLayout, NoLogsInfo, NoTracesInfo, Notice, OPERATORS, OPERATOR_LABELS, OpenAIIcon, OpenErrorsInLogsButton, OpenInTracesButton, OpenaiChatIcon, PageHeader, PageLayout, PanelSeparator, PermissionDenied, PickMultiPanel, Popover, PopoverContent, PopoverTrigger, PrevNextNav, ProcessStepList, ProcessStepListItem, ProcessStepProgressBar, ProcessorIcon, PromptIcon, PropertyFilterActions, PropertyFilterApplied, PropertyFilterCreator, ROOT_ENTITY_TYPES, ROOT_ENTITY_TYPE_OPTIONS, RadioGroup, RadioGroupItem, RepoIcon, Root$1 as Root, Row, RuleBuilder, RuleFieldSelect, RuleOperatorSelect, RuleRow, RuleValueInput, ScoresCardView, ScoresDataList, ScrollArea, ScrollBar, ScrollableContainer, SearchFieldBlock, Searchbar, SearchbarWrapper, Section, SectionCard, SectionRoot, Sections, Select, SelectContent, SelectDataFilter, SelectFieldBlock, SelectGroup, SelectItem, SelectTrigger, SelectValue, SessionExpired, SettingsIcon, SettingsRow, Shadows, SideDialog, Sizes, Skeleton, SkillIcon, SlashIcon, Slider, Spacings, SpanDataPanelView, SpanDetailsView, SpanTokenUsage, Spinner, StackedRunsBars, StatusBadge, SubSectionRoot, Switch, TRACE_DATE_FROM_PARAM, TRACE_DATE_PRESET_PARAM, TRACE_DATE_PRESET_VALUES, TRACE_DATE_TO_PARAM, TRACE_LIST_MODE_PARAM, TRACE_LIST_MODE_VALUES, TRACE_PROPERTY_FILTER_FIELD_IDS, TRACE_PROPERTY_FILTER_PARAM_BY_FIELD, TRACE_ROOT_ENTITY_TYPE_PARAM, TRACE_STATUS_OPTIONS, TRACE_STATUS_PARAM, TRACE_STATUS_VALUES, TRACE_SYNTHETIC_FILTER_FIELD_IDS, Tab, TabContent, TabList, Table, Tabs, Tbody, TextAndIcon, TextFieldBlock, Textarea, Th, Thead, ThemeProvider, ThemeToggle, ThreadDeleteButton, ThreadItem, ThreadLink, ThreadList, Threads, TimePicker, TimelineExpandCol, TimelineNameCol, TimelineStructureSign, TimelineTimingCol, Toaster, TokenUsageByAgentCardView, ToolCoinIcon, ToolsIcon, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TraceDataPanelView, TraceDetailsView, TraceIcon, TraceKeysAndValues, TraceTimeline, TraceTimelineSpan, TracesDataList, TracesErrorContent, TracesLayout, TracesListView, TracesToolbar, TracesVolumeCardView, Tree, Truncate, TsIcon, Txt, TxtCell, VARIABLE_PATTERN, VariablesIcon, WorkflowCoinIcon, WorkflowIcon, XGroqIcon, applyLogsPropertyFilterTokens, applyMetricsPropertyFilterTokens, applyTracePropertyFilterTokens, buildLogsDrilldownUrl, buildLogsListFilters, buildMetricsDimensionalFilter, buildTraceListFilters, buildTracesDrilldownUrl, buttonVariants, clearSavedLogsFilters, clearSavedMetricsFilters, clearSavedTraceFilters, cn, comboboxStyles, countLeafRules, createDefaultRule, createDefaultRuleGroup, createField, createLogsPropertyFilterFields, createMetricsPropertyFilterFields, createTracePropertyFilterFields, createVariableAutocomplete, fieldsToJSONSchema, fileToBase64, flattenSchemaToVariables, focusRing, formElementFocus, formElementFocusWithin, formElementRadius, formElementSizes, formElementTransition, formatCompact, formatCost, formatHierarchicalSpans, formatJSON, generateDefaultValues, getAllSpanIds, getChildFieldOptions, getColumnTemplate, getFieldOptionAtPath, getFieldOptionsFromSchema, getFileContentType, getInputPreview, getIsLinkActive, getItemListColumnTemplate, getLogsPropertyFilterTokens, getMainContentContentClassName, getMetricsPropertyFilterTokens, getPreservedLogsFilterParams, getPreservedTraceFilterParams, getShortId$1 as getShortId, getSpanDescendantIds, getSpanTypeUi, getStatusIcon, getToNextEntryFn, getToNextItemFn, getToPreviousEntryFn, getToPreviousItemFn, getTokenLimitMessage, getTracePropertyFilterTokens, groupTracesByThread, hasAnyLogsFilterParams, hasAnyMetricsFilterParams, hasAnyTraceFilterParams, highlight, hoverEffects, inputVariants, is401UnauthorizedError, is403ForbiddenError, isNonRetryableError, isObjectEmpty, isRule, isRuleGroup, isTokenLimitExceeded, isValidJson, isValidPreset, jsonSchemaToFields, loadLogsFiltersFromStorage, loadMetricsFiltersFromStorage, loadTraceFiltersFromStorage, lodashTitleCase, narrowWindowToBucket, navItemClasses, neutralizeFilterTokens, neutralizeLogsFilterTokens, parseError, parseFieldPath, saveLogsFiltersToStorage, saveMetricsFiltersToStorage, saveTraceFiltersToStorage, sharedFormElementDisabledStyle, sharedFormElementFocusStyle, sharedFormElementStyle, shouldRetryQuery, spanTypePrefixes, stringToColor, textareaVariants, toSigFigs, toast, transitions, truncateString, useActiveResourcesKpiMetrics, useActiveThreadsKpiMetrics, useAgentRunsKpiMetrics, useAutoscroll, useCodemirrorTheme$3 as useCodemirrorTheme, useCopyToClipboard, useDrilldown, useEntityNames, useEnvironments, useInView, useJSONSchemaForm, useJSONSchemaFormField, useJSONSchemaFormNestedContext, useLatencyMetrics, useLogs, useLogsFilterPersistence, useLogsListNavigation, useLogsUrlState, useMainSidebar, useMaybeSidebar, useMetrics, useMetricsFilters, useModelCostKpiMetrics, useModelUsageCostMetrics, usePlaygroundStore, useScoresMetrics, useServiceNames, useSpanDetail, useTableKeyboardNavigation, useTags, useTheme, useTokenUsageByAgentMetrics, useTopActiveThreadsMetrics, useTopResourcesByThreadsMetrics, useTotalTokensKpiMetrics, useTraceFilterPersistence, useTraceLightSpans, useTraceListNavigation, useTraceSpanNavigation, useTraceSpans, useTraceUrlState, useTraceVolumeMetrics, useTraces, variableHighlight };
21430
+ export { AddField, AgentCoinIcon, AgentIcon, AgentNetworkCoinIcon, AiIcon, AlertDialog, AmazonIcon, AnthropicChatIcon, AnthropicMessagesIcon, ApiIcon, Avatar, AzureIcon, Badge, BarListContent, BorderColors, BorderRadius, BranchIcon, BrandLoader, Breadcrumb, Button, ButtonWithTooltip, ButtonsGroup, ButtonsGroupSeparator, ButtonsGroupText, CHART_COLORS, CONTEXT_FIELD_IDS, Card, CardContent, CardDescription, CardFooter, CardHeader, CardHeading, CardTitle, Cell, CheckIcon, Checkbox, ChevronIcon, Chip, ChipsGroup, CodeBlock$1 as CodeBlock, CodeDiff, CodeEditor, CohereIcon, Collapsible, CollapsibleContent, CollapsiblePanel, CollapsibleTrigger, Colors, Column, Columns, Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CommitIcon, ContentBlock, ContentBlocks, CopyButton, CrossIcon, Crumb, DATE_PRESETS, DEFAULT_LOGS_FILTERS_STORAGE_KEY, DEFAULT_TRACE_FILTERS_STORAGE_KEY, DashboardCard, DataCodeSection, DataDetailsPanel, DataKeysAndValues, DataList, DataListSkeleton, DataPanel, DatePicker, DateRangeSelector, DateTimeCell, DateTimePicker, DateTimePickerContent, DateTimeRangePicker, DbIcon, DebugIcon, DefaultTrigger, DeploymentIcon, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DividerIcon, DocsIcon, DropdownMenu, EXTENSION_TO_MIME, ElementSelect, EmptyState, Entity, EntityContent, EntityDescription, EntityHeader, EntityIcon, EntityList, EntityListPageLayout, EntityListSkeleton, EntityName, Entry, EntryCell, EntryList, EntryListSkeleton, EnvIcon, ErrorBoundary, ErrorState, Field, FieldBlock, FieldBlocksLayout, FieldDescription, FieldList, FieldName, FieldNullable, FieldOptional, FieldRemove, FieldType, FiltersIcon, FolderIcon, FontSizes, GithubCoinIcon, GithubIcon, Glows, GoogleIcon, GroqIcon, Header$1 as Header, HeaderAction, HeaderGroup, HeaderTitle, HomeIcon, HorizontalBars, HoverPopover, Icon, InfoIcon, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea, ItemList, ItemListSkeleton, JSONSchemaForm, JudgeIcon, Kbd, KeyValueList, KpiCardView, LOGS_DATE_FROM_PARAM, LOGS_DATE_PRESET_PARAM, LOGS_DATE_PRESET_VALUES, LOGS_DATE_TO_PARAM, LOGS_PROPERTY_FILTER_FIELD_IDS, LOGS_PROPERTY_FILTER_PARAM_BY_FIELD, LOGS_ROOT_ENTITY_TYPES, LOGS_ROOT_ENTITY_TYPE_OPTIONS, LOGS_ROOT_ENTITY_TYPE_PARAM, LOG_LEVEL_OPTIONS, LOG_LEVEL_VALUES, Label, LatencyCardView, LatencyIcon, LineHeights, ListSearch, LogDetailsView, Logo, LogoWithoutText, LogsDataList, DataListSkeleton as LogsDataListSkeleton, LogsErrorContent, LogsIcon, LogsLayout, LogsListView, LogsToolbar, MainContentContent, MainContentLayout, MainHeader, MainSidebar, MainSidebarMobileTrigger, MainSidebarProvider, MainSidebarTrigger, MarkdownRenderer, MastraIcon, McpCoinIcon, McpServerIcon, MemoryCardView, MemoryIcon, MetricsCard, MetricsDataTable, MetricsFlexGrid, MetricsKpiCard, MetricsLineChart, MetricsLineChartTooltip, MetricsProvider, MistralIcon, ModelUsageCostCardView, MultiColumn, MultiCombobox, NestedFields, NetlifyIcon, NoDataPageLayout, NoLogsInfo, NoTracesInfo, Notice, OPERATORS, OPERATOR_LABELS, OpenAIIcon, OpenErrorsInLogsButton, OpenInTracesButton, OpenaiChatIcon, PageHeader, PageLayout, PanelSeparator, PermissionDenied, PickMultiPanel, Popover, PopoverContent, PopoverTrigger, PrevNextNav, ProcessStepList, ProcessStepListItem, ProcessStepProgressBar, ProcessorIcon, PromptIcon, PropertyFilterActions, PropertyFilterApplied, PropertyFilterCreator, ROOT_ENTITY_TYPES, ROOT_ENTITY_TYPE_OPTIONS, RadioGroup, RadioGroupItem, RepoIcon, Root$1 as Root, Row, RuleBuilder, RuleFieldSelect, RuleOperatorSelect, RuleRow, RuleValueInput, ScoresCardView, ScoresDataList, ScrollArea, ScrollBar, ScrollableContainer, SearchFieldBlock, Searchbar, SearchbarWrapper, Section, SectionCard, SectionRoot, Sections, Select, SelectContent, SelectDataFilter, SelectFieldBlock, SelectGroup, SelectItem, SelectTrigger, SelectValue, SessionExpired, SettingsIcon, SettingsRow, Shadows, SideDialog, Sizes, Skeleton, SkillIcon, SlashIcon, Slider, Spacings, SpanDataPanelView, SpanDetailsView, SpanTokenUsage, Spinner, StackedRunsBars, StatusBadge, SubSectionRoot, Switch, TRACE_ANCHOR_SPAN_ID_PARAM, TRACE_DATE_FROM_PARAM, TRACE_DATE_PRESET_PARAM, TRACE_DATE_PRESET_VALUES, TRACE_DATE_TO_PARAM, TRACE_LIST_MODE_PARAM, TRACE_LIST_MODE_VALUES, TRACE_PROPERTY_FILTER_FIELD_IDS, TRACE_PROPERTY_FILTER_PARAM_BY_FIELD, TRACE_ROOT_ENTITY_TYPE_PARAM, TRACE_STATUS_OPTIONS, TRACE_STATUS_PARAM, TRACE_STATUS_VALUES, TRACE_SYNTHETIC_FILTER_FIELD_IDS, Tab, TabContent, TabList, Table, Tabs, Tbody, TextAndIcon, TextFieldBlock, Textarea, Th, Thead, ThemeProvider, ThemeToggle, TimePicker, TimelineExpandCol, TimelineNameCol, TimelineStructureSign, TimelineTimingCol, Toaster, TokenUsageByAgentCardView, ToolCoinIcon, ToolsIcon, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, TraceDataPanelView, TraceDetailsView, TraceIcon, TraceKeysAndValues, TraceTimeline, TraceTimelineSpan, TracesDataList, TracesErrorContent, TracesLayout, TracesListModeToggle, TracesListView, TracesToolbar, TracesVolumeCardView, Tree, Truncate, TsIcon, Txt, TxtCell, VARIABLE_PATTERN, VariablesIcon, WorkflowCoinIcon, WorkflowIcon, XGroqIcon, applyLogsPropertyFilterTokens, applyMetricsPropertyFilterTokens, applyTracePropertyFilterTokens, buildLogsDrilldownUrl, buildLogsListFilters, buildMetricsDimensionalFilter, buildTraceListFilters, buildTracesDrilldownUrl, buttonVariants, buttonsGroupVariants, clearSavedLogsFilters, clearSavedMetricsFilters, clearSavedTraceFilters, cn, comboboxStyles, countLeafRules, createDefaultRule, createDefaultRuleGroup, createField, createLogsPropertyFilterFields, createMetricsPropertyFilterFields, createTracePropertyFilterFields, createVariableAutocomplete, fieldsToJSONSchema, fileToBase64, flattenSchemaToVariables, focusRing, formElementFocus, formElementFocusWithin, formElementRadius, formElementSizes, formElementTransition, formatCompact, formatCost, formatHierarchicalSpans, formatJSON, generateDefaultValues, getAllSpanIds, getChildFieldOptions, getColumnTemplate, getFieldOptionAtPath, getFieldOptionsFromSchema, getFileContentType, getInputPreview, getIsLinkActive, getItemListColumnTemplate, getLogsPropertyFilterTokens, getMainContentContentClassName, getMetricsPropertyFilterTokens, getPreservedLogsFilterParams, getPreservedTraceFilterParams, getShortId$1 as getShortId, getSpanDescendantIds, getSpanTypeUi, getStatusIcon, getToNextEntryFn, getToNextItemFn, getToPreviousEntryFn, getToPreviousItemFn, getTokenLimitMessage, getTracePropertyFilterTokens, groupTracesByThread, hasAnyLogsFilterParams, hasAnyMetricsFilterParams, hasAnyTraceFilterParams, highlight, hoverEffects, inputVariants, is401UnauthorizedError, is403ForbiddenError, isNonRetryableError, isObjectEmpty, isRule, isRuleGroup, isTokenLimitExceeded, isValidJson, isValidPreset, jsonSchemaToFields, loadLogsFiltersFromStorage, loadMetricsFiltersFromStorage, loadTraceFiltersFromStorage, lodashTitleCase, narrowWindowToBucket, navItemClasses, neutralizeFilterTokens, neutralizeLogsFilterTokens, parseError, parseFieldPath, saveLogsFiltersToStorage, saveMetricsFiltersToStorage, saveTraceFiltersToStorage, sharedFormElementDisabledStyle, sharedFormElementFocusStyle, sharedFormElementStyle, shouldRetryQuery, spanTypePrefixes, stringToColor, textareaVariants, toSigFigs, toast, transitions, truncateString, useActiveResourcesKpiMetrics, useActiveThreadsKpiMetrics, useAgentRunsKpiMetrics, useAutoscroll, useBranch, useCodemirrorTheme$3 as useCodemirrorTheme, useCopyToClipboard, useDrilldown, useEntityNames, useEnvironments, useInView, useJSONSchemaForm, useJSONSchemaFormField, useJSONSchemaFormNestedContext, useLatencyMetrics, useLogs, useLogsFilterPersistence, useLogsListNavigation, useLogsUrlState, useMainSidebar, useMaybeSidebar, useMetrics, useMetricsFilters, useModelCostKpiMetrics, useModelUsageCostMetrics, usePlaygroundStore, useScoresMetrics, useServiceNames, useSpanDetail, useTableKeyboardNavigation, useTags, useTheme, useTokenUsageByAgentMetrics, useTopActiveThreadsMetrics, useTopResourcesByThreadsMetrics, useTotalTokensKpiMetrics, useTraceFilterPersistence, useTraceLightSpans, useTraceListNavigation, useTraceOrBranchSpans, useTraceSpanNavigation, useTraceSpans, useTraceUrlState, useTraceVolumeMetrics, useTraces, variableHighlight };
21009
21431
  //# sourceMappingURL=index.es.js.map