@mastra/playground-ui 57.0.0-alpha.4 → 57.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.
- package/dist/components/DisabledFeatureButton.cjs.js +44 -0
- package/dist/components/DisabledFeatureButton.cjs.js.map +1 -0
- package/dist/components/DisabledFeatureButton.d.ts +2 -0
- package/dist/components/DisabledFeatureButton.es.js +40 -0
- package/dist/components/DisabledFeatureButton.es.js.map +1 -0
- package/dist/components/LogsDataList.cjs.js +2 -0
- package/dist/components/LogsDataList.cjs.js.map +1 -1
- package/dist/components/LogsDataList.es.js +2 -0
- package/dist/components/LogsDataList.es.js.map +1 -1
- package/dist/components/MainSidebar.cjs.js +11 -125
- package/dist/components/MainSidebar.cjs.js.map +1 -1
- package/dist/components/MainSidebar.es.js +1 -120
- package/dist/components/MainSidebar.es.js.map +1 -1
- package/dist/domains/traces/components/traces-page-skeleton.cjs.js +2 -0
- package/dist/domains/traces/components/traces-page-skeleton.cjs.js.map +1 -1
- package/dist/domains/traces/components/traces-page-skeleton.es.js +2 -0
- package/dist/domains/traces/components/traces-page-skeleton.es.js.map +1 -1
- package/dist/ee/signals/components/entity-index-list.cjs.js +2 -0
- package/dist/ee/signals/components/entity-index-list.cjs.js.map +1 -1
- package/dist/ee/signals/components/entity-index-list.es.js +2 -0
- package/dist/ee/signals/components/entity-index-list.es.js.map +1 -1
- package/dist/ee/signals/components/trace-intelligence-entity-index.cjs.js +1 -0
- package/dist/ee/signals/components/trace-intelligence-entity-index.cjs.js.map +1 -1
- package/dist/ee/signals/components/trace-intelligence-entity-index.es.js +1 -0
- package/dist/ee/signals/components/trace-intelligence-entity-index.es.js.map +1 -1
- package/dist/{main-sidebar-link-active-cFZ7oAVi.js → main-sidebar-Cf5G9iaC.js} +118 -6
- package/dist/main-sidebar-Cf5G9iaC.js.map +1 -0
- package/dist/{main-sidebar-link-active-DMPiqFak.cjs → main-sidebar-DYfRxFn4.cjs} +117 -4
- package/dist/main-sidebar-DYfRxFn4.cjs.map +1 -0
- package/dist/new/sidebar.cjs.js +32 -32
- package/dist/new/sidebar.cjs.js.map +1 -1
- package/dist/new/sidebar.es.js +2 -2
- package/dist/src/ds/components/DisabledFeatureButton/disabled-feature-button.d.ts +13 -0
- package/dist/src/ds/components/DisabledFeatureButton/index.d.ts +1 -0
- package/dist/style.css +4 -0
- package/package.json +7 -7
- package/dist/main-sidebar-link-active-DMPiqFak.cjs.map +0 -1
- package/dist/main-sidebar-link-active-cFZ7oAVi.js.map +0 -1
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const jsxRuntime = require('react/jsx-runtime');
|
|
6
|
+
const lucideReact = require('lucide-react');
|
|
7
|
+
const Button = require('../Button-MMZPEb_q.cjs');
|
|
8
|
+
const tooltip = require('../tooltip-FvWL16Xn.cjs');
|
|
9
|
+
const primitives_transitions = require('../primitives/transitions.cjs.js');
|
|
10
|
+
const utils_cn = require('../cn-DG0X1KEP.cjs');
|
|
11
|
+
|
|
12
|
+
function DisabledFeatureButton({ icon, label, tooltipContent, docsHref }) {
|
|
13
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(tooltip.Tooltip, { children: [
|
|
14
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
15
|
+
tooltip.TooltipTrigger,
|
|
16
|
+
{
|
|
17
|
+
render: /* @__PURE__ */ jsxRuntime.jsx("span", { role: "button", tabIndex: 0, "aria-disabled": "true", "aria-label": label, className: "inline-flex", children: /* @__PURE__ */ jsxRuntime.jsx(Button.Button, { variant: "ghost", size: "icon-md", disabled: true, "aria-hidden": "true", tabIndex: -1, children: icon }) })
|
|
18
|
+
}
|
|
19
|
+
),
|
|
20
|
+
/* @__PURE__ */ jsxRuntime.jsx(tooltip.TooltipContent, { side: "bottom", className: "max-w-[calc(100dvw-1rem)]", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { children: [
|
|
21
|
+
tooltipContent,
|
|
22
|
+
" ",
|
|
23
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
24
|
+
"a",
|
|
25
|
+
{
|
|
26
|
+
href: docsHref,
|
|
27
|
+
target: "_blank",
|
|
28
|
+
rel: "noopener noreferrer",
|
|
29
|
+
className: utils_cn.cn(
|
|
30
|
+
"inline-flex items-center gap-1 text-inherit underline hover:text-foreground",
|
|
31
|
+
primitives_transitions.controlStateColorTransition
|
|
32
|
+
),
|
|
33
|
+
children: [
|
|
34
|
+
"Learn more",
|
|
35
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { className: "size-3" })
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
)
|
|
39
|
+
] }) })
|
|
40
|
+
] });
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
exports.DisabledFeatureButton = DisabledFeatureButton;
|
|
44
|
+
//# sourceMappingURL=DisabledFeatureButton.cjs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DisabledFeatureButton.cjs.js","sources":["../../src/ds/components/DisabledFeatureButton/disabled-feature-button.tsx"],"sourcesContent":["import { ExternalLink } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { Button } from '@/ds/components/Button';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@/ds/components/Tooltip';\nimport { controlStateColorTransition } from '@/ds/primitives/transitions';\nimport { cn } from '@/lib/utils';\n\nexport type DisabledFeatureButtonProps = {\n icon: ReactNode;\n label: string;\n tooltipContent: ReactNode;\n docsHref: `https://${string}`;\n};\n\n/**\n * Icon-only, disabled control for a feature that is not available yet.\n * The focusable wrapper carries the accessible name and disabled state so the\n * tooltip stays reachable by keyboard while the visual button remains inert.\n */\nexport function DisabledFeatureButton({ icon, label, tooltipContent, docsHref }: DisabledFeatureButtonProps) {\n return (\n <Tooltip>\n <TooltipTrigger\n render={\n <span role=\"button\" tabIndex={0} aria-disabled=\"true\" aria-label={label} className=\"inline-flex\">\n <Button variant=\"ghost\" size=\"icon-md\" disabled aria-hidden=\"true\" tabIndex={-1}>\n {icon}\n </Button>\n </span>\n }\n />\n <TooltipContent side=\"bottom\" className=\"max-w-[calc(100dvw-1rem)]\">\n <span>\n {tooltipContent}{' '}\n <a\n href={docsHref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n 'inline-flex items-center gap-1 text-inherit underline hover:text-foreground',\n controlStateColorTransition,\n )}\n >\n Learn more\n <ExternalLink className=\"size-3\" />\n </a>\n </span>\n </TooltipContent>\n </Tooltip>\n );\n}\n"],"names":["Tooltip","jsx","TooltipTrigger","Button","TooltipContent","jsxs","cn","controlStateColorTransition","ExternalLink"],"mappings":";;;;;;;;;;;AAoBO,SAAS,sBAAsB,EAAE,IAAA,EAAM,KAAA,EAAO,cAAA,EAAgB,UAAS,EAA+B;AAC3G,EAAA,uCACGA,eAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAAC,cAAA;AAAA,MAACC,sBAAA;AAAA,MAAA;AAAA,QACC,MAAA,kBACED,cAAA,CAAC,MAAA,EAAA,EAAK,IAAA,EAAK,QAAA,EAAS,QAAA,EAAU,CAAA,EAAG,eAAA,EAAc,MAAA,EAAO,YAAA,EAAY,KAAA,EAAO,SAAA,EAAU,aAAA,EACjF,yCAACE,aAAA,EAAA,EAAO,OAAA,EAAQ,OAAA,EAAQ,IAAA,EAAK,SAAA,EAAU,QAAA,EAAQ,IAAA,EAAC,aAAA,EAAY,MAAA,EAAO,QAAA,EAAU,EAAA,EAC1E,QAAA,EAAA,IAAA,EACH,CAAA,EACF;AAAA;AAAA,KAEJ;AAAA,mCACCC,sBAAA,EAAA,EAAe,IAAA,EAAK,UAAS,SAAA,EAAU,2BAAA,EACtC,0CAAC,MAAA,EAAA,EACE,QAAA,EAAA;AAAA,MAAA,cAAA;AAAA,MAAgB,GAAA;AAAA,sBACjBC,eAAA;AAAA,QAAC,GAAA;AAAA,QAAA;AAAA,UACC,IAAA,EAAM,QAAA;AAAA,UACN,MAAA,EAAO,QAAA;AAAA,UACP,GAAA,EAAI,qBAAA;AAAA,UACJ,SAAA,EAAWC,WAAA;AAAA,YACT,6EAAA;AAAA,YACAC;AAAA,WACF;AAAA,UACD,QAAA,EAAA;AAAA,YAAA,YAAA;AAAA,4BAECN,cAAA,CAACO,wBAAA,EAAA,EAAa,SAAA,EAAU,QAAA,EAAS;AAAA;AAAA;AAAA;AACnC,KAAA,EACF,CAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { ExternalLink } from 'lucide-react';
|
|
3
|
+
import { B as Button } from '../Button-KUj0U-5I.js';
|
|
4
|
+
import { T as Tooltip, c as TooltipTrigger, a as TooltipContent } from '../tooltip-BrDiP0RI.js';
|
|
5
|
+
import { controlStateColorTransition } from '../primitives/transitions.es.js';
|
|
6
|
+
import { c as cn } from '../cn-65Adrsfj.js';
|
|
7
|
+
|
|
8
|
+
function DisabledFeatureButton({ icon, label, tooltipContent, docsHref }) {
|
|
9
|
+
return /* @__PURE__ */ jsxs(Tooltip, { children: [
|
|
10
|
+
/* @__PURE__ */ jsx(
|
|
11
|
+
TooltipTrigger,
|
|
12
|
+
{
|
|
13
|
+
render: /* @__PURE__ */ jsx("span", { role: "button", tabIndex: 0, "aria-disabled": "true", "aria-label": label, className: "inline-flex", children: /* @__PURE__ */ jsx(Button, { variant: "ghost", size: "icon-md", disabled: true, "aria-hidden": "true", tabIndex: -1, children: icon }) })
|
|
14
|
+
}
|
|
15
|
+
),
|
|
16
|
+
/* @__PURE__ */ jsx(TooltipContent, { side: "bottom", className: "max-w-[calc(100dvw-1rem)]", children: /* @__PURE__ */ jsxs("span", { children: [
|
|
17
|
+
tooltipContent,
|
|
18
|
+
" ",
|
|
19
|
+
/* @__PURE__ */ jsxs(
|
|
20
|
+
"a",
|
|
21
|
+
{
|
|
22
|
+
href: docsHref,
|
|
23
|
+
target: "_blank",
|
|
24
|
+
rel: "noopener noreferrer",
|
|
25
|
+
className: cn(
|
|
26
|
+
"inline-flex items-center gap-1 text-inherit underline hover:text-foreground",
|
|
27
|
+
controlStateColorTransition
|
|
28
|
+
),
|
|
29
|
+
children: [
|
|
30
|
+
"Learn more",
|
|
31
|
+
/* @__PURE__ */ jsx(ExternalLink, { className: "size-3" })
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
)
|
|
35
|
+
] }) })
|
|
36
|
+
] });
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export { DisabledFeatureButton };
|
|
40
|
+
//# sourceMappingURL=DisabledFeatureButton.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DisabledFeatureButton.es.js","sources":["../../src/ds/components/DisabledFeatureButton/disabled-feature-button.tsx"],"sourcesContent":["import { ExternalLink } from 'lucide-react';\nimport type { ReactNode } from 'react';\n\nimport { Button } from '@/ds/components/Button';\nimport { Tooltip, TooltipContent, TooltipTrigger } from '@/ds/components/Tooltip';\nimport { controlStateColorTransition } from '@/ds/primitives/transitions';\nimport { cn } from '@/lib/utils';\n\nexport type DisabledFeatureButtonProps = {\n icon: ReactNode;\n label: string;\n tooltipContent: ReactNode;\n docsHref: `https://${string}`;\n};\n\n/**\n * Icon-only, disabled control for a feature that is not available yet.\n * The focusable wrapper carries the accessible name and disabled state so the\n * tooltip stays reachable by keyboard while the visual button remains inert.\n */\nexport function DisabledFeatureButton({ icon, label, tooltipContent, docsHref }: DisabledFeatureButtonProps) {\n return (\n <Tooltip>\n <TooltipTrigger\n render={\n <span role=\"button\" tabIndex={0} aria-disabled=\"true\" aria-label={label} className=\"inline-flex\">\n <Button variant=\"ghost\" size=\"icon-md\" disabled aria-hidden=\"true\" tabIndex={-1}>\n {icon}\n </Button>\n </span>\n }\n />\n <TooltipContent side=\"bottom\" className=\"max-w-[calc(100dvw-1rem)]\">\n <span>\n {tooltipContent}{' '}\n <a\n href={docsHref}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className={cn(\n 'inline-flex items-center gap-1 text-inherit underline hover:text-foreground',\n controlStateColorTransition,\n )}\n >\n Learn more\n <ExternalLink className=\"size-3\" />\n </a>\n </span>\n </TooltipContent>\n </Tooltip>\n );\n}\n"],"names":[],"mappings":";;;;;;;AAoBO,SAAS,sBAAsB,EAAE,IAAA,EAAM,KAAA,EAAO,cAAA,EAAgB,UAAS,EAA+B;AAC3G,EAAA,4BACG,OAAA,EAAA,EACC,QAAA,EAAA;AAAA,oBAAA,GAAA;AAAA,MAAC,cAAA;AAAA,MAAA;AAAA,QACC,MAAA,kBACE,GAAA,CAAC,MAAA,EAAA,EAAK,IAAA,EAAK,QAAA,EAAS,QAAA,EAAU,CAAA,EAAG,eAAA,EAAc,MAAA,EAAO,YAAA,EAAY,KAAA,EAAO,SAAA,EAAU,aAAA,EACjF,8BAAC,MAAA,EAAA,EAAO,OAAA,EAAQ,OAAA,EAAQ,IAAA,EAAK,SAAA,EAAU,QAAA,EAAQ,IAAA,EAAC,aAAA,EAAY,MAAA,EAAO,QAAA,EAAU,EAAA,EAC1E,QAAA,EAAA,IAAA,EACH,CAAA,EACF;AAAA;AAAA,KAEJ;AAAA,wBACC,cAAA,EAAA,EAAe,IAAA,EAAK,UAAS,SAAA,EAAU,2BAAA,EACtC,+BAAC,MAAA,EAAA,EACE,QAAA,EAAA;AAAA,MAAA,cAAA;AAAA,MAAgB,GAAA;AAAA,sBACjB,IAAA;AAAA,QAAC,GAAA;AAAA,QAAA;AAAA,UACC,IAAA,EAAM,QAAA;AAAA,UACN,MAAA,EAAO,QAAA;AAAA,UACP,GAAA,EAAI,qBAAA;AAAA,UACJ,SAAA,EAAW,EAAA;AAAA,YACT,6EAAA;AAAA,YACA;AAAA,WACF;AAAA,UACD,QAAA,EAAA;AAAA,YAAA,YAAA;AAAA,4BAEC,GAAA,CAAC,YAAA,EAAA,EAAa,SAAA,EAAU,QAAA,EAAS;AAAA;AAAA;AAAA;AACnC,KAAA,EACF,CAAA,EACF;AAAA,GAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -4,6 +4,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
4
4
|
|
|
5
5
|
const logsDataList = require('../logs-data-list-DgoCLb6k.cjs');
|
|
6
6
|
const dataListSkeleton = require('../data-list-skeleton-K_WmrVke.cjs');
|
|
7
|
+
require('react');
|
|
8
|
+
require('../keyboard/keyboard-shortcuts-context.cjs.js');
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogsDataList.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LogsDataList.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LogsDataList.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LogsDataList.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
|
|
@@ -2,132 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
4
|
|
|
5
|
-
const
|
|
6
|
-
const utils_cn = require('../cn-DG0X1KEP.cjs');
|
|
7
|
-
const mainSidebarLinkActive = require('../main-sidebar-link-active-DMPiqFak.cjs');
|
|
8
|
-
const reactVisuallyHidden = require('@radix-ui/react-visually-hidden');
|
|
9
|
-
const React = require('react');
|
|
5
|
+
const mainSidebar = require('../main-sidebar-DYfRxFn4.cjs');
|
|
10
6
|
|
|
11
|
-
function MainSidebarBottom({ className, children, ...props }) {
|
|
12
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils_cn.cn("mt-auto", className), ...props, children });
|
|
13
|
-
}
|
|
14
7
|
|
|
15
|
-
function MainSidebarNavHeader({
|
|
16
|
-
children,
|
|
17
|
-
className,
|
|
18
|
-
state: stateProp,
|
|
19
|
-
href,
|
|
20
|
-
isActive,
|
|
21
|
-
LinkComponent: LinkProp,
|
|
22
|
-
...props
|
|
23
|
-
}) {
|
|
24
|
-
const ctx = mainSidebarLinkActive.useMaybeSidebarState();
|
|
25
|
-
const state = stateProp ?? ctx?.state ?? "default";
|
|
26
|
-
const isMobile = ctx?.isMobile ?? false;
|
|
27
|
-
const Link = LinkProp ?? ctx?.LinkComponent ?? "a";
|
|
28
|
-
const showTitle = state === "default" && !isMobile;
|
|
29
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: utils_cn.cn("mt-2 mb-0.5 flex min-h-8 min-w-0 items-center", className), children: showTitle ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
30
|
-
"header",
|
|
31
|
-
{
|
|
32
|
-
...props,
|
|
33
|
-
className: utils_cn.cn("max-w-full min-w-0 truncate pl-3 text-column", {
|
|
34
|
-
"text-foreground": isActive,
|
|
35
|
-
"text-muted-foreground/70": !isActive
|
|
36
|
-
}),
|
|
37
|
-
children: href ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
38
|
-
Link,
|
|
39
|
-
{
|
|
40
|
-
href,
|
|
41
|
-
className: utils_cn.cn("block min-w-0 truncate transition-colors duration-normal", {
|
|
42
|
-
"hover:text-foreground": !isActive,
|
|
43
|
-
"text-foreground": isActive
|
|
44
|
-
}),
|
|
45
|
-
children
|
|
46
|
-
}
|
|
47
|
-
) : children
|
|
48
|
-
}
|
|
49
|
-
) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
50
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactVisuallyHidden.VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsx("header", { ...props, children }) }),
|
|
51
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { "aria-hidden": "true", className: "mx-3 h-px flex-1 bg-border" })
|
|
52
|
-
] }) });
|
|
53
|
-
}
|
|
54
8
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
level,
|
|
66
|
-
subItems: childLinks.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(mainSidebarLinkActive.MainSidebarNavList, { className: "mt-0.5", children: childLinks.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
67
|
-
MainSidebarSectionLink,
|
|
68
|
-
{
|
|
69
|
-
link: child,
|
|
70
|
-
activeCandidates,
|
|
71
|
-
level: level + 1,
|
|
72
|
-
isActive
|
|
73
|
-
},
|
|
74
|
-
getLinkKey(child)
|
|
75
|
-
)) }) : null
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
|
-
function MainSidebarSections({ sections, isActive, className }) {
|
|
80
|
-
const baseId = React.useId();
|
|
81
|
-
return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: sections.map((section) => {
|
|
82
|
-
const showSeparator = section.links.length > 0 && section.separator;
|
|
83
|
-
const headerId = section.title ? `${baseId}-${section.key}` : void 0;
|
|
84
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
85
|
-
mainSidebarLinkActive.MainSidebarNavSection,
|
|
86
|
-
{
|
|
87
|
-
className,
|
|
88
|
-
"aria-labelledby": headerId,
|
|
89
|
-
"aria-label": !headerId ? section.key : void 0,
|
|
90
|
-
children: [
|
|
91
|
-
showSeparator ? /* @__PURE__ */ jsxRuntime.jsx(mainSidebarLinkActive.MainSidebarNavSeparator, {}) : null,
|
|
92
|
-
section.title ? /* @__PURE__ */ jsxRuntime.jsx(MainSidebarNavHeader, { id: headerId, href: section.href, isActive: section.isHeaderActive, children: section.title }) : null,
|
|
93
|
-
/* @__PURE__ */ jsxRuntime.jsx(mainSidebarLinkActive.MainSidebarNavList, { children: section.links.map((link) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
94
|
-
MainSidebarSectionLink,
|
|
95
|
-
{
|
|
96
|
-
link,
|
|
97
|
-
activeCandidates: section.links,
|
|
98
|
-
isActive
|
|
99
|
-
},
|
|
100
|
-
getLinkKey(link)
|
|
101
|
-
)) })
|
|
102
|
-
]
|
|
103
|
-
},
|
|
104
|
-
section.key
|
|
105
|
-
);
|
|
106
|
-
}) });
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
const MainSidebar = Object.assign(mainSidebarLinkActive.MainSidebarRoot, {
|
|
110
|
-
Bottom: MainSidebarBottom,
|
|
111
|
-
Nav: mainSidebarLinkActive.MainSidebarNav,
|
|
112
|
-
NavSection: mainSidebarLinkActive.MainSidebarNavSection,
|
|
113
|
-
NavLink: mainSidebarLinkActive.MainSidebarNavLink,
|
|
114
|
-
NavLabel: mainSidebarLinkActive.MainSidebarNavLabel,
|
|
115
|
-
NavHeader: MainSidebarNavHeader,
|
|
116
|
-
NavList: mainSidebarLinkActive.MainSidebarNavList,
|
|
117
|
-
NavSeparator: mainSidebarLinkActive.MainSidebarNavSeparator,
|
|
118
|
-
Sections: MainSidebarSections,
|
|
119
|
-
Trigger: mainSidebarLinkActive.MainSidebarTrigger,
|
|
120
|
-
MobileTrigger: mainSidebarLinkActive.MainSidebarMobileTrigger
|
|
121
|
-
});
|
|
122
|
-
|
|
123
|
-
exports.MainSidebarMobileTrigger = mainSidebarLinkActive.MainSidebarMobileTrigger;
|
|
124
|
-
exports.MainSidebarProvider = mainSidebarLinkActive.MainSidebarProvider;
|
|
125
|
-
exports.MainSidebarTrigger = mainSidebarLinkActive.MainSidebarTrigger;
|
|
126
|
-
exports.getIsLinkActive = mainSidebarLinkActive.getIsLinkActive;
|
|
127
|
-
exports.navItemClasses = mainSidebarLinkActive.navItemClasses;
|
|
128
|
-
exports.useMainSidebar = mainSidebarLinkActive.useMainSidebar;
|
|
129
|
-
exports.useMaybeSidebar = mainSidebarLinkActive.useMaybeSidebar;
|
|
130
|
-
exports.useMaybeSidebarState = mainSidebarLinkActive.useMaybeSidebarState;
|
|
131
|
-
exports.useMobileDrawer = mainSidebarLinkActive.useMobileDrawer;
|
|
132
|
-
exports.MainSidebar = MainSidebar;
|
|
9
|
+
exports.MainSidebar = mainSidebar.MainSidebar;
|
|
10
|
+
exports.MainSidebarMobileTrigger = mainSidebar.MainSidebarMobileTrigger;
|
|
11
|
+
exports.MainSidebarProvider = mainSidebar.MainSidebarProvider;
|
|
12
|
+
exports.MainSidebarTrigger = mainSidebar.MainSidebarTrigger;
|
|
13
|
+
exports.getIsLinkActive = mainSidebar.getIsLinkActive;
|
|
14
|
+
exports.navItemClasses = mainSidebar.navItemClasses;
|
|
15
|
+
exports.useMainSidebar = mainSidebar.useMainSidebar;
|
|
16
|
+
exports.useMaybeSidebar = mainSidebar.useMaybeSidebar;
|
|
17
|
+
exports.useMaybeSidebarState = mainSidebar.useMaybeSidebarState;
|
|
18
|
+
exports.useMobileDrawer = mainSidebar.useMobileDrawer;
|
|
133
19
|
//# sourceMappingURL=MainSidebar.cjs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MainSidebar.cjs.js","sources":["../../src/ds/components/MainSidebar/main-sidebar-bottom.tsx","../../src/ds/components/MainSidebar/main-sidebar-nav-header.tsx","../../src/ds/components/MainSidebar/main-sidebar-sections.tsx","../../src/ds/components/MainSidebar/main-sidebar.ts"],"sourcesContent":["import type { ComponentPropsWithoutRef } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport type MainSidebarBottomProps = ComponentPropsWithoutRef<'div'>;\n\nexport function MainSidebarBottom({ className, children, ...props }: MainSidebarBottomProps) {\n return (\n <div className={cn('mt-auto', className)} {...props}>\n {children}\n </div>\n );\n}\n","import type { ComponentPropsWithoutRef } from 'react';\nimport type { SidebarState } from './main-sidebar-context';\nimport { useMaybeSidebarState } from './main-sidebar-context';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\nimport type { LinkComponent } from '@/ds/types/link-component';\nimport { cn } from '@/lib/utils';\n\nexport type MainSidebarNavHeaderProps = Omit<ComponentPropsWithoutRef<'header'>, 'children'> & {\n children?: React.ReactNode;\n state?: SidebarState;\n href?: string;\n isActive?: boolean;\n LinkComponent?: LinkComponent;\n};\nexport function MainSidebarNavHeader({\n children,\n className,\n state: stateProp,\n href,\n isActive,\n LinkComponent: LinkProp,\n ...props\n}: MainSidebarNavHeaderProps) {\n const ctx = useMaybeSidebarState();\n const state: SidebarState = stateProp ?? ctx?.state ?? 'default';\n const isMobile = ctx?.isMobile ?? false;\n const Link: LinkComponent = LinkProp ?? ctx?.LinkComponent ?? 'a';\n const showTitle = state === 'default' && !isMobile;\n\n return (\n <div className={cn('mt-2 mb-0.5 flex min-h-8 min-w-0 items-center', className)}>\n {showTitle ? (\n <header\n {...props}\n className={cn('max-w-full min-w-0 truncate pl-3 text-column', {\n 'text-foreground': isActive,\n 'text-muted-foreground/70': !isActive,\n })}\n >\n {href ? (\n <Link\n href={href}\n className={cn('block min-w-0 truncate transition-colors duration-normal', {\n 'hover:text-foreground': !isActive,\n 'text-foreground': isActive,\n })}\n >\n {children}\n </Link>\n ) : (\n children\n )}\n </header>\n ) : (\n <>\n <VisuallyHidden asChild>\n <header {...props}>{children}</header>\n </VisuallyHidden>\n <div aria-hidden=\"true\" className=\"mx-3 h-px flex-1 bg-border\" />\n </>\n )}\n </div>\n );\n}\n","import { useId } from 'react';\nimport { MainSidebarNavHeader } from './main-sidebar-nav-header';\nimport { MainSidebarNavLink } from './main-sidebar-nav-link';\nimport type { NavLink } from './main-sidebar-nav-link';\nimport { MainSidebarNavList } from './main-sidebar-nav-list';\nimport { MainSidebarNavSection } from './main-sidebar-nav-section';\nimport type { NavSection } from './main-sidebar-nav-section';\nimport { MainSidebarNavSeparator } from './main-sidebar-nav-separator';\n\nexport type MainSidebarSectionsProps = {\n sections: NavSection[];\n /**\n * Called per link to decide the active state. Receives the section's links so\n * callers can use section-aware active logic without re-scanning `sections`\n * from the outside. Default: each link's `isActive`.\n */\n isActive?: (link: NavLink, activeCandidates: NavLink[]) => boolean;\n className?: string;\n};\n\ntype MainSidebarSectionLinkProps = {\n link: NavLink;\n activeCandidates: NavLink[];\n level?: number;\n isActive?: MainSidebarSectionsProps['isActive'];\n};\n\nfunction getLinkKey(link: NavLink) {\n return `${link.url}:${link.name}`;\n}\n\nfunction MainSidebarSectionLink({ link, activeCandidates, level = 0, isActive }: MainSidebarSectionLinkProps) {\n const childLinks = link.children ?? [];\n\n return (\n <MainSidebarNavLink\n link={link}\n isActive={isActive?.(link, activeCandidates) ?? link.isActive}\n level={level}\n subItems={\n childLinks.length > 0 ? (\n <MainSidebarNavList className=\"mt-0.5\">\n {childLinks.map(child => (\n <MainSidebarSectionLink\n key={getLinkKey(child)}\n link={child}\n activeCandidates={activeCandidates}\n level={level + 1}\n isActive={isActive}\n />\n ))}\n </MainSidebarNavList>\n ) : null\n }\n />\n );\n}\n\nexport function MainSidebarSections({ sections, isActive, className }: MainSidebarSectionsProps) {\n const baseId = useId();\n\n return (\n <>\n {sections.map(section => {\n const showSeparator = section.links.length > 0 && section.separator;\n const headerId = section.title ? `${baseId}-${section.key}` : undefined;\n return (\n <MainSidebarNavSection\n key={section.key}\n className={className}\n aria-labelledby={headerId}\n aria-label={!headerId ? section.key : undefined}\n >\n {/* Render separator and header independently — a section can have\n both (titled group preceded by a divider). */}\n {showSeparator ? <MainSidebarNavSeparator /> : null}\n {section.title ? (\n <MainSidebarNavHeader id={headerId} href={section.href} isActive={section.isHeaderActive}>\n {section.title}\n </MainSidebarNavHeader>\n ) : null}\n <MainSidebarNavList>\n {section.links.map(link => (\n <MainSidebarSectionLink\n key={getLinkKey(link)}\n link={link}\n activeCandidates={section.links}\n isActive={isActive}\n />\n ))}\n </MainSidebarNavList>\n </MainSidebarNavSection>\n );\n })}\n </>\n );\n}\n","import { MainSidebarBottom } from './main-sidebar-bottom';\nimport { MainSidebarMobileTrigger } from './main-sidebar-mobile-trigger';\nimport { MainSidebarNav } from './main-sidebar-nav';\nimport { MainSidebarNavHeader } from './main-sidebar-nav-header';\nimport { MainSidebarNavLabel } from './main-sidebar-nav-label';\nimport { MainSidebarNavLink } from './main-sidebar-nav-link';\nimport { MainSidebarNavList } from './main-sidebar-nav-list';\nimport { MainSidebarNavSection } from './main-sidebar-nav-section';\nimport { MainSidebarNavSeparator } from './main-sidebar-nav-separator';\nimport { MainSidebarRoot } from './main-sidebar-root';\nimport { MainSidebarSections } from './main-sidebar-sections';\nimport { MainSidebarTrigger } from './main-sidebar-trigger';\n\nexport type { MainSidebarStateContextValue, MobileDrawerContextValue, SidebarState } from './main-sidebar-context';\nexport { useMainSidebar, useMaybeSidebar, useMaybeSidebarState, useMobileDrawer } from './main-sidebar-context';\nexport { MainSidebarProvider, type MainSidebarProviderProps } from './main-sidebar-provider';\nexport { navItemClasses } from './main-sidebar-nav-item-classes';\nexport { type MainSidebarNavItemSize } from './main-sidebar-nav-item-classes';\nexport { type NavLink } from './main-sidebar-nav-link';\nexport { type NavSection } from './main-sidebar-nav-section';\nexport { MainSidebarTrigger } from './main-sidebar-trigger';\nexport { MainSidebarMobileTrigger } from './main-sidebar-mobile-trigger';\nexport { getIsLinkActive } from './main-sidebar-link-active';\n\nexport const MainSidebar = Object.assign(MainSidebarRoot, {\n Bottom: MainSidebarBottom,\n Nav: MainSidebarNav,\n NavSection: MainSidebarNavSection,\n NavLink: MainSidebarNavLink,\n NavLabel: MainSidebarNavLabel,\n NavHeader: MainSidebarNavHeader,\n NavList: MainSidebarNavList,\n NavSeparator: MainSidebarNavSeparator,\n Sections: MainSidebarSections,\n Trigger: MainSidebarTrigger,\n MobileTrigger: MainSidebarMobileTrigger,\n});\n"],"names":["jsx","cn","useMaybeSidebarState","jsxs","Fragment","VisuallyHidden","MainSidebarNavLink","MainSidebarNavList","useId","MainSidebarNavSection","MainSidebarNavSeparator","MainSidebarRoot","M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AAA,MAtBK,OAAA,CAAQ;AAAA,KAuBf;AAAA,EAEJ,CAAC,CAAA,EACH,CAAA;AAEJ;;ACxEO,MAAM,WAAA,GAAc,MAAA,CAAO,MAAA,CAAOW,qCAAA,EAAiB;AAAA,EACxD,MAAA,EAAQ,iBAAA;AAAA,EACR,GAAA,EAAKC,oCAAA;AAAA,EACL,UAAA,EAAYH,2CAAA;AAAA,EACZ,OAAA,EAASH,wCAAA;AAAA,EACT,QAAA,EAAUO,yCAAA;AAAA,EACV,SAAA,EAAW,oBAAA;AAAA,EACX,OAAA,EAASN,wCAAA;AAAA,EACT,YAAA,EAAcG,6CAAA;AAAA,EACd,QAAA,EAAU,mBAAA;AAAA,EACV,OAAA,EAASI,wCAAA;AAAA,EACT,aAAA,EAAeC;AACjB,CAAC;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"MainSidebar.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;"}
|
|
@@ -1,121 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
import { c as cn } from '../cn-65Adrsfj.js';
|
|
3
|
-
import { u as useMaybeSidebarState, M as MainSidebarNavSection, a as MainSidebarNavSeparator, b as MainSidebarNavList, c as MainSidebarNavLink, d as MainSidebarRoot, e as MainSidebarMobileTrigger, f as MainSidebarTrigger, g as MainSidebarNavLabel, h as MainSidebarNav } from '../main-sidebar-link-active-cFZ7oAVi.js';
|
|
4
|
-
export { i as MainSidebarProvider, j as getIsLinkActive, n as navItemClasses, k as useMainSidebar, l as useMaybeSidebar, m as useMobileDrawer } from '../main-sidebar-link-active-cFZ7oAVi.js';
|
|
5
|
-
import { VisuallyHidden } from '@radix-ui/react-visually-hidden';
|
|
6
|
-
import { useId } from 'react';
|
|
7
|
-
|
|
8
|
-
function MainSidebarBottom({ className, children, ...props }) {
|
|
9
|
-
return /* @__PURE__ */ jsx("div", { className: cn("mt-auto", className), ...props, children });
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
function MainSidebarNavHeader({
|
|
13
|
-
children,
|
|
14
|
-
className,
|
|
15
|
-
state: stateProp,
|
|
16
|
-
href,
|
|
17
|
-
isActive,
|
|
18
|
-
LinkComponent: LinkProp,
|
|
19
|
-
...props
|
|
20
|
-
}) {
|
|
21
|
-
const ctx = useMaybeSidebarState();
|
|
22
|
-
const state = stateProp ?? ctx?.state ?? "default";
|
|
23
|
-
const isMobile = ctx?.isMobile ?? false;
|
|
24
|
-
const Link = LinkProp ?? ctx?.LinkComponent ?? "a";
|
|
25
|
-
const showTitle = state === "default" && !isMobile;
|
|
26
|
-
return /* @__PURE__ */ jsx("div", { className: cn("mt-2 mb-0.5 flex min-h-8 min-w-0 items-center", className), children: showTitle ? /* @__PURE__ */ jsx(
|
|
27
|
-
"header",
|
|
28
|
-
{
|
|
29
|
-
...props,
|
|
30
|
-
className: cn("max-w-full min-w-0 truncate pl-3 text-column", {
|
|
31
|
-
"text-foreground": isActive,
|
|
32
|
-
"text-muted-foreground/70": !isActive
|
|
33
|
-
}),
|
|
34
|
-
children: href ? /* @__PURE__ */ jsx(
|
|
35
|
-
Link,
|
|
36
|
-
{
|
|
37
|
-
href,
|
|
38
|
-
className: cn("block min-w-0 truncate transition-colors duration-normal", {
|
|
39
|
-
"hover:text-foreground": !isActive,
|
|
40
|
-
"text-foreground": isActive
|
|
41
|
-
}),
|
|
42
|
-
children
|
|
43
|
-
}
|
|
44
|
-
) : children
|
|
45
|
-
}
|
|
46
|
-
) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
47
|
-
/* @__PURE__ */ jsx(VisuallyHidden, { asChild: true, children: /* @__PURE__ */ jsx("header", { ...props, children }) }),
|
|
48
|
-
/* @__PURE__ */ jsx("div", { "aria-hidden": "true", className: "mx-3 h-px flex-1 bg-border" })
|
|
49
|
-
] }) });
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
function getLinkKey(link) {
|
|
53
|
-
return `${link.url}:${link.name}`;
|
|
54
|
-
}
|
|
55
|
-
function MainSidebarSectionLink({ link, activeCandidates, level = 0, isActive }) {
|
|
56
|
-
const childLinks = link.children ?? [];
|
|
57
|
-
return /* @__PURE__ */ jsx(
|
|
58
|
-
MainSidebarNavLink,
|
|
59
|
-
{
|
|
60
|
-
link,
|
|
61
|
-
isActive: isActive?.(link, activeCandidates) ?? link.isActive,
|
|
62
|
-
level,
|
|
63
|
-
subItems: childLinks.length > 0 ? /* @__PURE__ */ jsx(MainSidebarNavList, { className: "mt-0.5", children: childLinks.map((child) => /* @__PURE__ */ jsx(
|
|
64
|
-
MainSidebarSectionLink,
|
|
65
|
-
{
|
|
66
|
-
link: child,
|
|
67
|
-
activeCandidates,
|
|
68
|
-
level: level + 1,
|
|
69
|
-
isActive
|
|
70
|
-
},
|
|
71
|
-
getLinkKey(child)
|
|
72
|
-
)) }) : null
|
|
73
|
-
}
|
|
74
|
-
);
|
|
75
|
-
}
|
|
76
|
-
function MainSidebarSections({ sections, isActive, className }) {
|
|
77
|
-
const baseId = useId();
|
|
78
|
-
return /* @__PURE__ */ jsx(Fragment, { children: sections.map((section) => {
|
|
79
|
-
const showSeparator = section.links.length > 0 && section.separator;
|
|
80
|
-
const headerId = section.title ? `${baseId}-${section.key}` : void 0;
|
|
81
|
-
return /* @__PURE__ */ jsxs(
|
|
82
|
-
MainSidebarNavSection,
|
|
83
|
-
{
|
|
84
|
-
className,
|
|
85
|
-
"aria-labelledby": headerId,
|
|
86
|
-
"aria-label": !headerId ? section.key : void 0,
|
|
87
|
-
children: [
|
|
88
|
-
showSeparator ? /* @__PURE__ */ jsx(MainSidebarNavSeparator, {}) : null,
|
|
89
|
-
section.title ? /* @__PURE__ */ jsx(MainSidebarNavHeader, { id: headerId, href: section.href, isActive: section.isHeaderActive, children: section.title }) : null,
|
|
90
|
-
/* @__PURE__ */ jsx(MainSidebarNavList, { children: section.links.map((link) => /* @__PURE__ */ jsx(
|
|
91
|
-
MainSidebarSectionLink,
|
|
92
|
-
{
|
|
93
|
-
link,
|
|
94
|
-
activeCandidates: section.links,
|
|
95
|
-
isActive
|
|
96
|
-
},
|
|
97
|
-
getLinkKey(link)
|
|
98
|
-
)) })
|
|
99
|
-
]
|
|
100
|
-
},
|
|
101
|
-
section.key
|
|
102
|
-
);
|
|
103
|
-
}) });
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
const MainSidebar = Object.assign(MainSidebarRoot, {
|
|
107
|
-
Bottom: MainSidebarBottom,
|
|
108
|
-
Nav: MainSidebarNav,
|
|
109
|
-
NavSection: MainSidebarNavSection,
|
|
110
|
-
NavLink: MainSidebarNavLink,
|
|
111
|
-
NavLabel: MainSidebarNavLabel,
|
|
112
|
-
NavHeader: MainSidebarNavHeader,
|
|
113
|
-
NavList: MainSidebarNavList,
|
|
114
|
-
NavSeparator: MainSidebarNavSeparator,
|
|
115
|
-
Sections: MainSidebarSections,
|
|
116
|
-
Trigger: MainSidebarTrigger,
|
|
117
|
-
MobileTrigger: MainSidebarMobileTrigger
|
|
118
|
-
});
|
|
119
|
-
|
|
120
|
-
export { MainSidebar, MainSidebarMobileTrigger, MainSidebarTrigger, useMaybeSidebarState };
|
|
1
|
+
export { M as MainSidebar, a as MainSidebarMobileTrigger, b as MainSidebarProvider, c as MainSidebarTrigger, g as getIsLinkActive, n as navItemClasses, u as useMainSidebar, d as useMaybeSidebar, e as useMaybeSidebarState, f as useMobileDrawer } from '../main-sidebar-Cf5G9iaC.js';
|
|
121
2
|
//# sourceMappingURL=MainSidebar.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MainSidebar.es.js","sources":["../../src/ds/components/MainSidebar/main-sidebar-bottom.tsx","../../src/ds/components/MainSidebar/main-sidebar-nav-header.tsx","../../src/ds/components/MainSidebar/main-sidebar-sections.tsx","../../src/ds/components/MainSidebar/main-sidebar.ts"],"sourcesContent":["import type { ComponentPropsWithoutRef } from 'react';\nimport { cn } from '@/lib/utils';\n\nexport type MainSidebarBottomProps = ComponentPropsWithoutRef<'div'>;\n\nexport function MainSidebarBottom({ className, children, ...props }: MainSidebarBottomProps) {\n return (\n <div className={cn('mt-auto', className)} {...props}>\n {children}\n </div>\n );\n}\n","import type { ComponentPropsWithoutRef } from 'react';\nimport type { SidebarState } from './main-sidebar-context';\nimport { useMaybeSidebarState } from './main-sidebar-context';\nimport { VisuallyHidden } from '@/ds/primitives/visually-hidden';\nimport type { LinkComponent } from '@/ds/types/link-component';\nimport { cn } from '@/lib/utils';\n\nexport type MainSidebarNavHeaderProps = Omit<ComponentPropsWithoutRef<'header'>, 'children'> & {\n children?: React.ReactNode;\n state?: SidebarState;\n href?: string;\n isActive?: boolean;\n LinkComponent?: LinkComponent;\n};\nexport function MainSidebarNavHeader({\n children,\n className,\n state: stateProp,\n href,\n isActive,\n LinkComponent: LinkProp,\n ...props\n}: MainSidebarNavHeaderProps) {\n const ctx = useMaybeSidebarState();\n const state: SidebarState = stateProp ?? ctx?.state ?? 'default';\n const isMobile = ctx?.isMobile ?? false;\n const Link: LinkComponent = LinkProp ?? ctx?.LinkComponent ?? 'a';\n const showTitle = state === 'default' && !isMobile;\n\n return (\n <div className={cn('mt-2 mb-0.5 flex min-h-8 min-w-0 items-center', className)}>\n {showTitle ? (\n <header\n {...props}\n className={cn('max-w-full min-w-0 truncate pl-3 text-column', {\n 'text-foreground': isActive,\n 'text-muted-foreground/70': !isActive,\n })}\n >\n {href ? (\n <Link\n href={href}\n className={cn('block min-w-0 truncate transition-colors duration-normal', {\n 'hover:text-foreground': !isActive,\n 'text-foreground': isActive,\n })}\n >\n {children}\n </Link>\n ) : (\n children\n )}\n </header>\n ) : (\n <>\n <VisuallyHidden asChild>\n <header {...props}>{children}</header>\n </VisuallyHidden>\n <div aria-hidden=\"true\" className=\"mx-3 h-px flex-1 bg-border\" />\n </>\n )}\n </div>\n );\n}\n","import { useId } from 'react';\nimport { MainSidebarNavHeader } from './main-sidebar-nav-header';\nimport { MainSidebarNavLink } from './main-sidebar-nav-link';\nimport type { NavLink } from './main-sidebar-nav-link';\nimport { MainSidebarNavList } from './main-sidebar-nav-list';\nimport { MainSidebarNavSection } from './main-sidebar-nav-section';\nimport type { NavSection } from './main-sidebar-nav-section';\nimport { MainSidebarNavSeparator } from './main-sidebar-nav-separator';\n\nexport type MainSidebarSectionsProps = {\n sections: NavSection[];\n /**\n * Called per link to decide the active state. Receives the section's links so\n * callers can use section-aware active logic without re-scanning `sections`\n * from the outside. Default: each link's `isActive`.\n */\n isActive?: (link: NavLink, activeCandidates: NavLink[]) => boolean;\n className?: string;\n};\n\ntype MainSidebarSectionLinkProps = {\n link: NavLink;\n activeCandidates: NavLink[];\n level?: number;\n isActive?: MainSidebarSectionsProps['isActive'];\n};\n\nfunction getLinkKey(link: NavLink) {\n return `${link.url}:${link.name}`;\n}\n\nfunction MainSidebarSectionLink({ link, activeCandidates, level = 0, isActive }: MainSidebarSectionLinkProps) {\n const childLinks = link.children ?? [];\n\n return (\n <MainSidebarNavLink\n link={link}\n isActive={isActive?.(link, activeCandidates) ?? link.isActive}\n level={level}\n subItems={\n childLinks.length > 0 ? (\n <MainSidebarNavList className=\"mt-0.5\">\n {childLinks.map(child => (\n <MainSidebarSectionLink\n key={getLinkKey(child)}\n link={child}\n activeCandidates={activeCandidates}\n level={level + 1}\n isActive={isActive}\n />\n ))}\n </MainSidebarNavList>\n ) : null\n }\n />\n );\n}\n\nexport function MainSidebarSections({ sections, isActive, className }: MainSidebarSectionsProps) {\n const baseId = useId();\n\n return (\n <>\n {sections.map(section => {\n const showSeparator = section.links.length > 0 && section.separator;\n const headerId = section.title ? `${baseId}-${section.key}` : undefined;\n return (\n <MainSidebarNavSection\n key={section.key}\n className={className}\n aria-labelledby={headerId}\n aria-label={!headerId ? section.key : undefined}\n >\n {/* Render separator and header independently — a section can have\n both (titled group preceded by a divider). */}\n {showSeparator ? <MainSidebarNavSeparator /> : null}\n {section.title ? (\n <MainSidebarNavHeader id={headerId} href={section.href} isActive={section.isHeaderActive}>\n {section.title}\n </MainSidebarNavHeader>\n ) : null}\n <MainSidebarNavList>\n {section.links.map(link => (\n <MainSidebarSectionLink\n key={getLinkKey(link)}\n link={link}\n activeCandidates={section.links}\n isActive={isActive}\n />\n ))}\n </MainSidebarNavList>\n </MainSidebarNavSection>\n );\n })}\n </>\n );\n}\n","import { MainSidebarBottom } from './main-sidebar-bottom';\nimport { MainSidebarMobileTrigger } from './main-sidebar-mobile-trigger';\nimport { MainSidebarNav } from './main-sidebar-nav';\nimport { MainSidebarNavHeader } from './main-sidebar-nav-header';\nimport { MainSidebarNavLabel } from './main-sidebar-nav-label';\nimport { MainSidebarNavLink } from './main-sidebar-nav-link';\nimport { MainSidebarNavList } from './main-sidebar-nav-list';\nimport { MainSidebarNavSection } from './main-sidebar-nav-section';\nimport { MainSidebarNavSeparator } from './main-sidebar-nav-separator';\nimport { MainSidebarRoot } from './main-sidebar-root';\nimport { MainSidebarSections } from './main-sidebar-sections';\nimport { MainSidebarTrigger } from './main-sidebar-trigger';\n\nexport type { MainSidebarStateContextValue, MobileDrawerContextValue, SidebarState } from './main-sidebar-context';\nexport { useMainSidebar, useMaybeSidebar, useMaybeSidebarState, useMobileDrawer } from './main-sidebar-context';\nexport { MainSidebarProvider, type MainSidebarProviderProps } from './main-sidebar-provider';\nexport { navItemClasses } from './main-sidebar-nav-item-classes';\nexport { type MainSidebarNavItemSize } from './main-sidebar-nav-item-classes';\nexport { type NavLink } from './main-sidebar-nav-link';\nexport { type NavSection } from './main-sidebar-nav-section';\nexport { MainSidebarTrigger } from './main-sidebar-trigger';\nexport { MainSidebarMobileTrigger } from './main-sidebar-mobile-trigger';\nexport { getIsLinkActive } from './main-sidebar-link-active';\n\nexport const MainSidebar = Object.assign(MainSidebarRoot, {\n Bottom: MainSidebarBottom,\n Nav: MainSidebarNav,\n NavSection: MainSidebarNavSection,\n NavLink: MainSidebarNavLink,\n NavLabel: MainSidebarNavLabel,\n NavHeader: MainSidebarNavHeader,\n NavList: MainSidebarNavList,\n NavSeparator: MainSidebarNavSeparator,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MAtBK,OAAA,CAAQ;AAAA,KAuBf;AAAA,EAEJ,CAAC,CAAA,EACH,CAAA;AAEJ;;ACxEO,MAAM,WAAA,GAAc,MAAA,CAAO,MAAA,CAAO,eAAA,EAAiB;AAAA,EACxD,MAAA,EAAQ,iBAAA;AAAA,EACR,GAAA,EAAK,cAAA;AAAA,EACL,UAAA,EAAY,qBAAA;AAAA,EACZ,OAAA,EAAS,kBAAA;AAAA,EACT,QAAA,EAAU,mBAAA;AAAA,EACV,SAAA,EAAW,oBAAA;AAAA,EACX,OAAA,EAAS,kBAAA;AAAA,EACT,YAAA,EAAc,uBAAA;AAAA,EACd,QAAA,EAAU,mBAAA;AAAA,EACV,OAAA,EAAS,kBAAA;AAAA,EACT,aAAA,EAAe;AACjB,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"MainSidebar.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -5,6 +5,8 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
5
5
|
const jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
const domains_traces_traceListColumns = require('../trace-list-columns.cjs.js');
|
|
7
7
|
const dataListSkeleton = require('../../../data-list-skeleton-K_WmrVke.cjs');
|
|
8
|
+
require('react');
|
|
9
|
+
require('../../../keyboard/keyboard-shortcuts-context.cjs.js');
|
|
8
10
|
const skeleton = require('../../../skeleton-cXUjPrq9.cjs');
|
|
9
11
|
|
|
10
12
|
function TracesPageSkeleton({ columnPreferences = domains_traces_traceListColumns.DEFAULT_TRACE_COLUMN_PREFERENCES }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traces-page-skeleton.cjs.js","sources":["../../../../src/domains/traces/components/traces-page-skeleton.tsx"],"sourcesContent":["import { buildTraceListColumns, DEFAULT_TRACE_COLUMN_PREFERENCES } from '../trace-list-columns';\nimport type { TraceColumnPreferences } from '../trace-list-columns';\nimport { DataListSkeleton } from '@/ds/components/DataList';\nimport { Skeleton } from '@/ds/components/Skeleton';\n\nexport type TracesPageSkeletonProps = {\n columnPreferences?: TraceColumnPreferences;\n};\n\n/**\n * Page-level placeholder shown while filter-field discovery is pending: a toolbar-height\n * bar stands in for the FilterBar and the usual list skeleton for the trace rows.\n */\nexport function TracesPageSkeleton({ columnPreferences = DEFAULT_TRACE_COLUMN_PREFERENCES }: TracesPageSkeletonProps) {\n const columns = buildTraceListColumns(columnPreferences);\n return (\n <div\n className=\"flex h-full min-h-0 flex-col gap-2\"\n role=\"status\"\n aria-label=\"Loading traces\"\n data-testid=\"traces-page-skeleton\"\n >\n <div className=\"flex items-center gap-2\">\n <Skeleton className=\"h-control-md min-w-64 flex-1\" />\n <Skeleton className=\"h-control-md w-28\" />\n </div>\n <DataListSkeleton columns={columns} fit=\"container\" />\n </div>\n );\n}\n"],"names":["DEFAULT_TRACE_COLUMN_PREFERENCES","buildTraceListColumns","jsxs","jsx","Skeleton","DataListSkeleton"],"mappings":"
|
|
1
|
+
{"version":3,"file":"traces-page-skeleton.cjs.js","sources":["../../../../src/domains/traces/components/traces-page-skeleton.tsx"],"sourcesContent":["import { buildTraceListColumns, DEFAULT_TRACE_COLUMN_PREFERENCES } from '../trace-list-columns';\nimport type { TraceColumnPreferences } from '../trace-list-columns';\nimport { DataListSkeleton } from '@/ds/components/DataList';\nimport { Skeleton } from '@/ds/components/Skeleton';\n\nexport type TracesPageSkeletonProps = {\n columnPreferences?: TraceColumnPreferences;\n};\n\n/**\n * Page-level placeholder shown while filter-field discovery is pending: a toolbar-height\n * bar stands in for the FilterBar and the usual list skeleton for the trace rows.\n */\nexport function TracesPageSkeleton({ columnPreferences = DEFAULT_TRACE_COLUMN_PREFERENCES }: TracesPageSkeletonProps) {\n const columns = buildTraceListColumns(columnPreferences);\n return (\n <div\n className=\"flex h-full min-h-0 flex-col gap-2\"\n role=\"status\"\n aria-label=\"Loading traces\"\n data-testid=\"traces-page-skeleton\"\n >\n <div className=\"flex items-center gap-2\">\n <Skeleton className=\"h-control-md min-w-64 flex-1\" />\n <Skeleton className=\"h-control-md w-28\" />\n </div>\n <DataListSkeleton columns={columns} fit=\"container\" />\n </div>\n );\n}\n"],"names":["DEFAULT_TRACE_COLUMN_PREFERENCES","buildTraceListColumns","jsxs","jsx","Skeleton","DataListSkeleton"],"mappings":";;;;;;;;;;;AAaO,SAAS,kBAAA,CAAmB,EAAE,iBAAA,GAAoBA,gEAAA,EAAiC,EAA4B;AACpH,EAAA,MAAM,OAAA,GAAUC,sDAAsB,iBAAiB,CAAA;AACvD,EAAA,uBACEC,eAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAU,oCAAA;AAAA,MACV,IAAA,EAAK,QAAA;AAAA,MACL,YAAA,EAAW,gBAAA;AAAA,MACX,aAAA,EAAY,sBAAA;AAAA,MAEZ,QAAA,EAAA;AAAA,wBAAAA,eAAA,CAAC,KAAA,EAAA,EAAI,WAAU,yBAAA,EACb,QAAA,EAAA;AAAA,0BAAAC,cAAA,CAACC,iBAAA,EAAA,EAAS,WAAU,8BAAA,EAA+B,CAAA;AAAA,0BACnDD,cAAA,CAACC,iBAAA,EAAA,EAAS,SAAA,EAAU,mBAAA,EAAoB;AAAA,SAAA,EAC1C,CAAA;AAAA,wBACAD,cAAA,CAACE,iCAAA,EAAA,EAAiB,OAAA,EAAkB,GAAA,EAAI,WAAA,EAAY;AAAA;AAAA;AAAA,GACtD;AAEJ;;;;"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { buildTraceListColumns, DEFAULT_TRACE_COLUMN_PREFERENCES } from '../trace-list-columns.es.js';
|
|
3
3
|
import { D as DataListSkeleton } from '../../../data-list-skeleton-h4pILqCC.js';
|
|
4
|
+
import 'react';
|
|
5
|
+
import '../../../keyboard/keyboard-shortcuts-context.es.js';
|
|
4
6
|
import { S as Skeleton } from '../../../skeleton-BsRAXyh5.js';
|
|
5
7
|
|
|
6
8
|
function TracesPageSkeleton({ columnPreferences = DEFAULT_TRACE_COLUMN_PREFERENCES }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"traces-page-skeleton.es.js","sources":["../../../../src/domains/traces/components/traces-page-skeleton.tsx"],"sourcesContent":["import { buildTraceListColumns, DEFAULT_TRACE_COLUMN_PREFERENCES } from '../trace-list-columns';\nimport type { TraceColumnPreferences } from '../trace-list-columns';\nimport { DataListSkeleton } from '@/ds/components/DataList';\nimport { Skeleton } from '@/ds/components/Skeleton';\n\nexport type TracesPageSkeletonProps = {\n columnPreferences?: TraceColumnPreferences;\n};\n\n/**\n * Page-level placeholder shown while filter-field discovery is pending: a toolbar-height\n * bar stands in for the FilterBar and the usual list skeleton for the trace rows.\n */\nexport function TracesPageSkeleton({ columnPreferences = DEFAULT_TRACE_COLUMN_PREFERENCES }: TracesPageSkeletonProps) {\n const columns = buildTraceListColumns(columnPreferences);\n return (\n <div\n className=\"flex h-full min-h-0 flex-col gap-2\"\n role=\"status\"\n aria-label=\"Loading traces\"\n data-testid=\"traces-page-skeleton\"\n >\n <div className=\"flex items-center gap-2\">\n <Skeleton className=\"h-control-md min-w-64 flex-1\" />\n <Skeleton className=\"h-control-md w-28\" />\n </div>\n <DataListSkeleton columns={columns} fit=\"container\" />\n </div>\n );\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"traces-page-skeleton.es.js","sources":["../../../../src/domains/traces/components/traces-page-skeleton.tsx"],"sourcesContent":["import { buildTraceListColumns, DEFAULT_TRACE_COLUMN_PREFERENCES } from '../trace-list-columns';\nimport type { TraceColumnPreferences } from '../trace-list-columns';\nimport { DataListSkeleton } from '@/ds/components/DataList';\nimport { Skeleton } from '@/ds/components/Skeleton';\n\nexport type TracesPageSkeletonProps = {\n columnPreferences?: TraceColumnPreferences;\n};\n\n/**\n * Page-level placeholder shown while filter-field discovery is pending: a toolbar-height\n * bar stands in for the FilterBar and the usual list skeleton for the trace rows.\n */\nexport function TracesPageSkeleton({ columnPreferences = DEFAULT_TRACE_COLUMN_PREFERENCES }: TracesPageSkeletonProps) {\n const columns = buildTraceListColumns(columnPreferences);\n return (\n <div\n className=\"flex h-full min-h-0 flex-col gap-2\"\n role=\"status\"\n aria-label=\"Loading traces\"\n data-testid=\"traces-page-skeleton\"\n >\n <div className=\"flex items-center gap-2\">\n <Skeleton className=\"h-control-md min-w-64 flex-1\" />\n <Skeleton className=\"h-control-md w-28\" />\n </div>\n <DataListSkeleton columns={columns} fit=\"container\" />\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;AAaO,SAAS,kBAAA,CAAmB,EAAE,iBAAA,GAAoB,gCAAA,EAAiC,EAA4B;AACpH,EAAA,MAAM,OAAA,GAAU,sBAAsB,iBAAiB,CAAA;AACvD,EAAA,uBACE,IAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA,EAAU,oCAAA;AAAA,MACV,IAAA,EAAK,QAAA;AAAA,MACL,YAAA,EAAW,gBAAA;AAAA,MACX,aAAA,EAAY,sBAAA;AAAA,MAEZ,QAAA,EAAA;AAAA,wBAAA,IAAA,CAAC,KAAA,EAAA,EAAI,WAAU,yBAAA,EACb,QAAA,EAAA;AAAA,0BAAA,GAAA,CAAC,QAAA,EAAA,EAAS,WAAU,8BAAA,EAA+B,CAAA;AAAA,0BACnD,GAAA,CAAC,QAAA,EAAA,EAAS,SAAA,EAAU,mBAAA,EAAoB;AAAA,SAAA,EAC1C,CAAA;AAAA,wBACA,GAAA,CAAC,gBAAA,EAAA,EAAiB,OAAA,EAAkB,GAAA,EAAI,WAAA,EAAY;AAAA;AAAA;AAAA,GACtD;AAEJ;;;;"}
|
|
@@ -6,6 +6,8 @@ const jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
const ee_signals_components_entityIndexModel = require('./entity-index-model.cjs.js');
|
|
7
7
|
const Badge = require('../../../Badge-BEeYtjmv.cjs');
|
|
8
8
|
const dataList = require('../../../data-list-DSbuTWLI.cjs');
|
|
9
|
+
require('react');
|
|
10
|
+
require('../../../keyboard/keyboard-shortcuts-context.cjs.js');
|
|
9
11
|
|
|
10
12
|
const columns = "minmax(12rem,1.5fr) minmax(7rem,0.6fr) minmax(8rem,0.7fr) minmax(8rem,0.7fr) minmax(12rem,1fr)";
|
|
11
13
|
function Status({ entity }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-index-list.cjs.js","sources":["../../../../src/ee/signals/components/entity-index-list.tsx"],"sourcesContent":["import type { ThemeLearningEntity } from '@mastra/client-js';\n\nimport { entityIndexMetadata, entityStatusLabel } from './entity-index-model';\nimport { Badge } from '@/ds/components/Badge';\nimport { DataList } from '@/ds/components/DataList';\nimport type { LinkComponent } from '@/ds/types/link-component';\n\nconst columns = 'minmax(12rem,1.5fr) minmax(7rem,0.6fr) minmax(8rem,0.7fr) minmax(8rem,0.7fr) minmax(12rem,1fr)';\n\nexport interface EntityIndexListProps {\n entities: readonly ThemeLearningEntity[];\n hasSearch: boolean;\n getEntityHref: (entity: ThemeLearningEntity) => string;\n LinkComponent: LinkComponent;\n}\n\nfunction Status({ entity }: { entity: ThemeLearningEntity }) {\n const label = entityStatusLabel(entity.status);\n const variant = entity.status === 'ready' ? 'green' : entity.status === 'processing' ? 'blue' : 'neutral';\n return (\n <Badge variant={variant} size=\"sm\" indicator={entity.status === undefined ? undefined : 'dot'}>\n {label}\n </Badge>\n );\n}\n\nexport function EntityIndexList({ entities, hasSearch, getEntityHref, LinkComponent }: EntityIndexListProps) {\n return (\n <section aria-label=\"Trace Intelligence entities\" className=\"min-h-0\">\n <DataList columns={columns} fit=\"container\">\n <DataList.Top>\n <DataList.TopCell>Entity</DataList.TopCell>\n <DataList.TopCell>Traces</DataList.TopCell>\n <DataList.TopCell>Signals set</DataList.TopCell>\n <DataList.TopCell>Status</DataList.TopCell>\n <DataList.TopCell>Updated</DataList.TopCell>\n </DataList.Top>\n {entities.length === 0 && hasSearch ? <DataList.NoMatch message=\"No entities match your search\" /> : null}\n {entities.map(entity => {\n const metadata = entityIndexMetadata(entity);\n return (\n <DataList.RowLink\n key={`${entity.entityType}:${entity.entityId}`}\n to={getEntityHref(entity)}\n LinkComponent={LinkComponent}\n className=\"min-w-0\"\n >\n <DataList.Cell className=\"min-w-0 overflow-visible text-left\">\n <span className=\"sr-only\">Open entity {entity.entityId}</span>\n <span aria-hidden=\"true\" className=\"block overflow-clip text-ellipsis whitespace-nowrap\">\n {entity.entityId}\n </span>\n </DataList.Cell>\n <DataList.NumberCell>{metadata.traceCount}</DataList.NumberCell>\n <DataList.Cell>{metadata.signalsSet}</DataList.Cell>\n <DataList.Cell>\n <Status entity={entity} />\n </DataList.Cell>\n <DataList.Cell title={entity.updatedAt}>{metadata.updatedAt}</DataList.Cell>\n </DataList.RowLink>\n );\n })}\n </DataList>\n </section>\n );\n}\n"],"names":["entityStatusLabel","jsx","Badge","jsxs","DataList","entityIndexMetadata"],"mappings":"
|
|
1
|
+
{"version":3,"file":"entity-index-list.cjs.js","sources":["../../../../src/ee/signals/components/entity-index-list.tsx"],"sourcesContent":["import type { ThemeLearningEntity } from '@mastra/client-js';\n\nimport { entityIndexMetadata, entityStatusLabel } from './entity-index-model';\nimport { Badge } from '@/ds/components/Badge';\nimport { DataList } from '@/ds/components/DataList';\nimport type { LinkComponent } from '@/ds/types/link-component';\n\nconst columns = 'minmax(12rem,1.5fr) minmax(7rem,0.6fr) minmax(8rem,0.7fr) minmax(8rem,0.7fr) minmax(12rem,1fr)';\n\nexport interface EntityIndexListProps {\n entities: readonly ThemeLearningEntity[];\n hasSearch: boolean;\n getEntityHref: (entity: ThemeLearningEntity) => string;\n LinkComponent: LinkComponent;\n}\n\nfunction Status({ entity }: { entity: ThemeLearningEntity }) {\n const label = entityStatusLabel(entity.status);\n const variant = entity.status === 'ready' ? 'green' : entity.status === 'processing' ? 'blue' : 'neutral';\n return (\n <Badge variant={variant} size=\"sm\" indicator={entity.status === undefined ? undefined : 'dot'}>\n {label}\n </Badge>\n );\n}\n\nexport function EntityIndexList({ entities, hasSearch, getEntityHref, LinkComponent }: EntityIndexListProps) {\n return (\n <section aria-label=\"Trace Intelligence entities\" className=\"min-h-0\">\n <DataList columns={columns} fit=\"container\">\n <DataList.Top>\n <DataList.TopCell>Entity</DataList.TopCell>\n <DataList.TopCell>Traces</DataList.TopCell>\n <DataList.TopCell>Signals set</DataList.TopCell>\n <DataList.TopCell>Status</DataList.TopCell>\n <DataList.TopCell>Updated</DataList.TopCell>\n </DataList.Top>\n {entities.length === 0 && hasSearch ? <DataList.NoMatch message=\"No entities match your search\" /> : null}\n {entities.map(entity => {\n const metadata = entityIndexMetadata(entity);\n return (\n <DataList.RowLink\n key={`${entity.entityType}:${entity.entityId}`}\n to={getEntityHref(entity)}\n LinkComponent={LinkComponent}\n className=\"min-w-0\"\n >\n <DataList.Cell className=\"min-w-0 overflow-visible text-left\">\n <span className=\"sr-only\">Open entity {entity.entityId}</span>\n <span aria-hidden=\"true\" className=\"block overflow-clip text-ellipsis whitespace-nowrap\">\n {entity.entityId}\n </span>\n </DataList.Cell>\n <DataList.NumberCell>{metadata.traceCount}</DataList.NumberCell>\n <DataList.Cell>{metadata.signalsSet}</DataList.Cell>\n <DataList.Cell>\n <Status entity={entity} />\n </DataList.Cell>\n <DataList.Cell title={entity.updatedAt}>{metadata.updatedAt}</DataList.Cell>\n </DataList.RowLink>\n );\n })}\n </DataList>\n </section>\n );\n}\n"],"names":["entityStatusLabel","jsx","Badge","jsxs","DataList","entityIndexMetadata"],"mappings":";;;;;;;;;;;AAOA,MAAM,OAAA,GAAU,gGAAA;AAShB,SAAS,MAAA,CAAO,EAAE,MAAA,EAAO,EAAoC;AAC3D,EAAA,MAAM,KAAA,GAAQA,wDAAA,CAAkB,MAAA,CAAO,MAAM,CAAA;AAC7C,EAAA,MAAM,OAAA,GAAU,OAAO,MAAA,KAAW,OAAA,GAAU,UAAU,MAAA,CAAO,MAAA,KAAW,eAAe,MAAA,GAAS,SAAA;AAChG,EA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3C,MAAA,uBACEF,eAAA;AAAA,QAACC,iBAAA,CAAS,OAAA;AAAA,QAAT;AAAA,UAEC,EAAA,EAAI,cAAc,MAAM,CAAA;AAAA,UACxB,aAAA;AAAA,UACA,SAAA,EAAU,SAAA;AAAA,UAEV,QAAA,EAAA;AAAA,4BAAAD,eAAA,CAACC,iBAAA,CAAS,IAAA,EAAT,EAAc,SAAA,EAAU,oCAAA,EACvB,QAAA,EAAA;AAAA,8BAAAD,eAAA,CAAC,MAAA,EAAA,EAAK,WAAU,SAAA,EAAU,QAAA,EAAA;AAAA,gBAAA,cAAA;AAAA,gBAAa,MAAA,CAAO;AAAA,eAAA,EAAS,CAAA;AAAA,6CACtD,MAAA,EAAA,EAAK,aAAA,EAAY,QAAO,SAAA,EAAU,qDAAA,EAChC,iBAAO,QAAA,EACV;AAAA,aAAA,EACF,CAAA;AAAA,4BACAF,cAAA,CAACG,iBAAA,CAAS,UAAA,EAAT,EAAqB,mBAAS,UAAA,EAAW,CAAA;AAAA,4BAC1CH,cAAA,CAACG,iBAAA,CAAS,IAAA,EAAT,EAAe,mBAAS,UAAA,EAAW,CAAA;AAAA,2CACnCA,iBAAA,CAAS,IAAA,EAAT,EACC,QAAA,kBAAAH,cAAA,CAAC,MAAA,EAAA,EAAO,QAAgB,CAAA,EAC1B,CAAA;AAAA,4BACAA,cAAA,CAACG,kBAAS,IAAA,EAAT,EAAc,OAAO,MAAA,CAAO,SAAA,EAAY,mBAAS,SAAA,EAAU;AAAA;AAAA,SAAA;AAAA,QAhBvD,CAAA,EAAG,MAAA,CAAO,UAAU,CAAA,CAAA,EAAI,OAAO,QAAQ,CAAA;AAAA,OAiB9C;AAAA,IAEJ,CAAC;AAAA,GAAA,EACH,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -2,6 +2,8 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
2
2
|
import { entityIndexMetadata, entityStatusLabel } from './entity-index-model.es.js';
|
|
3
3
|
import { B as Badge } from '../../../Badge-TD55_qZJ.js';
|
|
4
4
|
import { D as DataList } from '../../../data-list-Cn0Ls4l2.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
import '../../../keyboard/keyboard-shortcuts-context.es.js';
|
|
5
7
|
|
|
6
8
|
const columns = "minmax(12rem,1.5fr) minmax(7rem,0.6fr) minmax(8rem,0.7fr) minmax(8rem,0.7fr) minmax(12rem,1fr)";
|
|
7
9
|
function Status({ entity }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entity-index-list.es.js","sources":["../../../../src/ee/signals/components/entity-index-list.tsx"],"sourcesContent":["import type { ThemeLearningEntity } from '@mastra/client-js';\n\nimport { entityIndexMetadata, entityStatusLabel } from './entity-index-model';\nimport { Badge } from '@/ds/components/Badge';\nimport { DataList } from '@/ds/components/DataList';\nimport type { LinkComponent } from '@/ds/types/link-component';\n\nconst columns = 'minmax(12rem,1.5fr) minmax(7rem,0.6fr) minmax(8rem,0.7fr) minmax(8rem,0.7fr) minmax(12rem,1fr)';\n\nexport interface EntityIndexListProps {\n entities: readonly ThemeLearningEntity[];\n hasSearch: boolean;\n getEntityHref: (entity: ThemeLearningEntity) => string;\n LinkComponent: LinkComponent;\n}\n\nfunction Status({ entity }: { entity: ThemeLearningEntity }) {\n const label = entityStatusLabel(entity.status);\n const variant = entity.status === 'ready' ? 'green' : entity.status === 'processing' ? 'blue' : 'neutral';\n return (\n <Badge variant={variant} size=\"sm\" indicator={entity.status === undefined ? undefined : 'dot'}>\n {label}\n </Badge>\n );\n}\n\nexport function EntityIndexList({ entities, hasSearch, getEntityHref, LinkComponent }: EntityIndexListProps) {\n return (\n <section aria-label=\"Trace Intelligence entities\" className=\"min-h-0\">\n <DataList columns={columns} fit=\"container\">\n <DataList.Top>\n <DataList.TopCell>Entity</DataList.TopCell>\n <DataList.TopCell>Traces</DataList.TopCell>\n <DataList.TopCell>Signals set</DataList.TopCell>\n <DataList.TopCell>Status</DataList.TopCell>\n <DataList.TopCell>Updated</DataList.TopCell>\n </DataList.Top>\n {entities.length === 0 && hasSearch ? <DataList.NoMatch message=\"No entities match your search\" /> : null}\n {entities.map(entity => {\n const metadata = entityIndexMetadata(entity);\n return (\n <DataList.RowLink\n key={`${entity.entityType}:${entity.entityId}`}\n to={getEntityHref(entity)}\n LinkComponent={LinkComponent}\n className=\"min-w-0\"\n >\n <DataList.Cell className=\"min-w-0 overflow-visible text-left\">\n <span className=\"sr-only\">Open entity {entity.entityId}</span>\n <span aria-hidden=\"true\" className=\"block overflow-clip text-ellipsis whitespace-nowrap\">\n {entity.entityId}\n </span>\n </DataList.Cell>\n <DataList.NumberCell>{metadata.traceCount}</DataList.NumberCell>\n <DataList.Cell>{metadata.signalsSet}</DataList.Cell>\n <DataList.Cell>\n <Status entity={entity} />\n </DataList.Cell>\n <DataList.Cell title={entity.updatedAt}>{metadata.updatedAt}</DataList.Cell>\n </DataList.RowLink>\n );\n })}\n </DataList>\n </section>\n );\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"entity-index-list.es.js","sources":["../../../../src/ee/signals/components/entity-index-list.tsx"],"sourcesContent":["import type { ThemeLearningEntity } from '@mastra/client-js';\n\nimport { entityIndexMetadata, entityStatusLabel } from './entity-index-model';\nimport { Badge } from '@/ds/components/Badge';\nimport { DataList } from '@/ds/components/DataList';\nimport type { LinkComponent } from '@/ds/types/link-component';\n\nconst columns = 'minmax(12rem,1.5fr) minmax(7rem,0.6fr) minmax(8rem,0.7fr) minmax(8rem,0.7fr) minmax(12rem,1fr)';\n\nexport interface EntityIndexListProps {\n entities: readonly ThemeLearningEntity[];\n hasSearch: boolean;\n getEntityHref: (entity: ThemeLearningEntity) => string;\n LinkComponent: LinkComponent;\n}\n\nfunction Status({ entity }: { entity: ThemeLearningEntity }) {\n const label = entityStatusLabel(entity.status);\n const variant = entity.status === 'ready' ? 'green' : entity.status === 'processing' ? 'blue' : 'neutral';\n return (\n <Badge variant={variant} size=\"sm\" indicator={entity.status === undefined ? undefined : 'dot'}>\n {label}\n </Badge>\n );\n}\n\nexport function EntityIndexList({ entities, hasSearch, getEntityHref, LinkComponent }: EntityIndexListProps) {\n return (\n <section aria-label=\"Trace Intelligence entities\" className=\"min-h-0\">\n <DataList columns={columns} fit=\"container\">\n <DataList.Top>\n <DataList.TopCell>Entity</DataList.TopCell>\n <DataList.TopCell>Traces</DataList.TopCell>\n <DataList.TopCell>Signals set</DataList.TopCell>\n <DataList.TopCell>Status</DataList.TopCell>\n <DataList.TopCell>Updated</DataList.TopCell>\n </DataList.Top>\n {entities.length === 0 && hasSearch ? <DataList.NoMatch message=\"No entities match your search\" /> : null}\n {entities.map(entity => {\n const metadata = entityIndexMetadata(entity);\n return (\n <DataList.RowLink\n key={`${entity.entityType}:${entity.entityId}`}\n to={getEntityHref(entity)}\n LinkComponent={LinkComponent}\n className=\"min-w-0\"\n >\n <DataList.Cell className=\"min-w-0 overflow-visible text-left\">\n <span className=\"sr-only\">Open entity {entity.entityId}</span>\n <span aria-hidden=\"true\" className=\"block overflow-clip text-ellipsis whitespace-nowrap\">\n {entity.entityId}\n </span>\n </DataList.Cell>\n <DataList.NumberCell>{metadata.traceCount}</DataList.NumberCell>\n <DataList.Cell>{metadata.signalsSet}</DataList.Cell>\n <DataList.Cell>\n <Status entity={entity} />\n </DataList.Cell>\n <DataList.Cell title={entity.updatedAt}>{metadata.updatedAt}</DataList.Cell>\n </DataList.RowLink>\n );\n })}\n </DataList>\n </section>\n );\n}\n"],"names":[],"mappings":";;;;;;;AAOA,MAAM,OAAA,GAAU,gGAAA;AAShB,SAAS,MAAA,CAAO,EAAE,MAAA,EAAO,EAAoC;AAC3D,EAAA,MAAM,KAAA,GAAQ,iBAAA,CAAkB,MAAA,CAAO,MAAM,CAAA;AAC7C,EAAA,MAAM,OAAA,GAAU,OAAO,MAAA,KAAW,OAAA,GAAU,UAAU,MAAA,CAAO,MAAA,KAAW,eAAe,MAAA,GAAS,SAAA;AAChG,EAAA,uBACE,GAAA,CAAC,KAAA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AA;AAAA,QAAT;AAAA,UAEC,EAAA,EAAI,cAAc,MAAM,CAAA;AAAA,UACxB,aAAA;AAAA,UACA,SAAA,EAAU,SAAA;AAAA,UAEV,QAAA,EAAA;AAAA,4BAAA,IAAA,CAAC,QAAA,CAAS,IAAA,EAAT,EAAc,SAAA,EAAU,oCAAA,EACvB,QAAA,EAAA;AAAA,8BAAA,IAAA,CAAC,MAAA,EAAA,EAAK,WAAU,SAAA,EAAU,QAAA,EAAA;AAAA,gBAAA,cAAA;AAAA,gBAAa,MAAA,CAAO;AAAA,eAAA,EAAS,CAAA;AAAA,kCACtD,MAAA,EAAA,EAAK,aAAA,EAAY,QAAO,SAAA,EAAU,qDAAA,EAChC,iBAAO,QAAA,EACV;AAAA,aAAA,EACF,CAAA;AAAA,4BACA,GAAA,CAAC,QAAA,CAAS,UAAA,EAAT,EAAqB,mBAAS,UAAA,EAAW,CAAA;AAAA,4BAC1C,GAAA,CAAC,QAAA,CAAS,IAAA,EAAT,EAAe,mBAAS,UAAA,EAAW,CAAA;AAAA,gCACnC,QAAA,CAAS,IAAA,EAAT,EACC,QAAA,kBAAA,GAAA,CAAC,MAAA,EAAA,EAAO,QAAgB,CAAA,EAC1B,CAAA;AAAA,4BACA,GAAA,CAAC,SAAS,IAAA,EAAT,EAAc,OAAO,MAAA,CAAO,SAAA,EAAY,mBAAS,SAAA,EAAU;AAAA;AAAA,SAAA;AAAA,QAhBvD,CAAA,EAAG,MAAA,CAAO,UAAU,CAAA,CAAA,EAAI,OAAO,QAAQ,CAAA;AAAA,OAiB9C;AAAA,IAEJ,CAAC;AAAA,GAAA,EACH,CAAA,EACF,CAAA;AAEJ;;;;"}
|
|
@@ -16,6 +16,7 @@ const ee_signals_components_entityIndexModel = require('./entity-index-model.cjs
|
|
|
16
16
|
const Button = require('../../../Button-MMZPEb_q.cjs');
|
|
17
17
|
const buttonsGroup = require('../../../buttons-group-CoZP3lJt.cjs');
|
|
18
18
|
const dataListSkeleton = require('../../../data-list-skeleton-K_WmrVke.cjs');
|
|
19
|
+
require('../../../keyboard/keyboard-shortcuts-context.cjs.js');
|
|
19
20
|
const EmptyState = require('../../../EmptyState-DiSP6UIy.cjs');
|
|
20
21
|
const ErrorState = require('../../../ErrorState-B0839u-q.cjs');
|
|
21
22
|
const listSearch = require('../../../list-search-DhReauU5.cjs');
|