@tangle-network/sandbox-ui 0.96.0 → 0.99.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/{WorkflowGraph-OPLQFAJK.js → WorkflowGraph-DB5F6ZSF.js} +1 -1
- package/dist/chat.d.ts +83 -257
- package/dist/chat.js +1 -10
- package/dist/{chunk-I5HGKZCB.js → chunk-G7CFCZQ7.js} +860 -1382
- package/dist/{chunk-22JEBRUV.js → chunk-JIZCCGD2.js} +1 -1
- package/dist/{chunk-5XRAKVIV.js → chunk-RQZRXKMR.js} +1 -5
- package/dist/{chunk-VQZ6XDRR.js → chunk-Y4OTBMZS.js} +730 -444
- package/dist/dashboard.d.ts +8 -86
- package/dist/dashboard.js +8 -24
- package/dist/globals.css +20 -104
- package/dist/index.d.ts +4 -4
- package/dist/index.js +10 -32
- package/dist/{model-brand-CuXKfTMh.d.ts → model-brand-BNnaUKKZ.d.ts} +2 -4
- package/dist/pages.d.ts +1 -1
- package/dist/pages.js +1 -2
- package/dist/styles.css +20 -104
- package/dist/workbench.js +3 -5
- package/dist/workflows.d.ts +1 -1
- package/dist/workflows.js +2 -2
- package/dist/workspace.d.ts +1 -1
- package/package.json +2 -1
- package/dist/chunk-WMVUJ5SA.js +0 -529
- package/dist/chunk-WSN2RZC6.js +0 -292
|
@@ -2,6 +2,9 @@ import {
|
|
|
2
2
|
Button,
|
|
3
3
|
Logo
|
|
4
4
|
} from "./chunk-4ZZUMXPX.js";
|
|
5
|
+
import {
|
|
6
|
+
moonshot_default
|
|
7
|
+
} from "./chunk-RQZRXKMR.js";
|
|
5
8
|
import {
|
|
6
9
|
cn
|
|
7
10
|
} from "./chunk-EI44GEQ5.js";
|
|
@@ -277,7 +280,7 @@ function ChevronsRightIcon({ className }) {
|
|
|
277
280
|
}
|
|
278
281
|
function RailCollapseToggle({ collapsed, showLabel, onToggle, className }) {
|
|
279
282
|
const label = collapsed ? "Expand sidebar" : "Collapse sidebar";
|
|
280
|
-
const
|
|
283
|
+
const Icon2 = collapsed ? ChevronsRightIcon : ChevronsLeftIcon;
|
|
281
284
|
return /* @__PURE__ */ jsx3(RailTooltip, { label, disabled: showLabel, className: showLabel ? "w-full" : void 0, children: /* @__PURE__ */ jsxs2(
|
|
282
285
|
"button",
|
|
283
286
|
{
|
|
@@ -293,7 +296,7 @@ function RailCollapseToggle({ collapsed, showLabel, onToggle, className }) {
|
|
|
293
296
|
className
|
|
294
297
|
),
|
|
295
298
|
children: [
|
|
296
|
-
/* @__PURE__ */ jsx3(
|
|
299
|
+
/* @__PURE__ */ jsx3(Icon2, { className: "h-[17px] w-[17px] shrink-0" }),
|
|
297
300
|
showLabel && /* @__PURE__ */ jsx3("span", { className: "text-[13.5px] font-medium", children: label })
|
|
298
301
|
]
|
|
299
302
|
}
|
|
@@ -403,7 +406,7 @@ function SidebarRailFooter({ children, className }) {
|
|
|
403
406
|
function RailSeparator({ className }) {
|
|
404
407
|
return /* @__PURE__ */ jsx3("div", { className: cn("my-2 h-px w-10 bg-[var(--md3-outline-variant)]", className) });
|
|
405
408
|
}
|
|
406
|
-
function RailButton({ icon:
|
|
409
|
+
function RailButton({ icon: Icon2, label, isActive, badge, onClick, className, showLabel, asChild, children, variant = "normal" }) {
|
|
407
410
|
const classes = cn(
|
|
408
411
|
"relative flex shrink-0 items-center justify-center rounded-md transition-colors duration-150",
|
|
409
412
|
showLabel ? "w-full justify-start px-2.5 h-9 gap-2.5" : "w-9 h-9 justify-center",
|
|
@@ -416,7 +419,7 @@ function RailButton({ icon: Icon, label, isActive, badge, onClick, className, sh
|
|
|
416
419
|
className
|
|
417
420
|
);
|
|
418
421
|
const iconWithBadge = /* @__PURE__ */ jsxs2("span", { className: "relative flex shrink-0 items-center justify-center", children: [
|
|
419
|
-
/* @__PURE__ */ jsx3(
|
|
422
|
+
/* @__PURE__ */ jsx3(Icon2, { className: "h-[17px] w-[17px] shrink-0" }),
|
|
420
423
|
badge !== void 0 && badge > 0 && /* @__PURE__ */ jsx3("span", { className: "absolute -top-1.5 -right-1.5 flex h-4 min-w-4 items-center justify-center rounded-full bg-primary text-[9px] font-bold text-[var(--md3-on-primary)] px-1", children: badge > 99 ? "99+" : badge })
|
|
421
424
|
] });
|
|
422
425
|
const content = /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
@@ -435,7 +438,7 @@ function RailButton({ icon: Icon, label, isActive, badge, onClick, className, sh
|
|
|
435
438
|
return /* @__PURE__ */ jsx3(RailTooltip, { label, disabled: showLabel, className: showLabel ? "w-full" : void 0, children: /* @__PURE__ */ jsx3("button", { type: "button", onClick, "aria-label": label, className: classes, children: content }) });
|
|
436
439
|
}
|
|
437
440
|
function RailFlyout({
|
|
438
|
-
icon:
|
|
441
|
+
icon: Icon2,
|
|
439
442
|
label,
|
|
440
443
|
isActive,
|
|
441
444
|
showLabel,
|
|
@@ -479,7 +482,7 @@ function RailFlyout({
|
|
|
479
482
|
onClick: () => setOpen((v) => !v),
|
|
480
483
|
className: triggerClasses,
|
|
481
484
|
children: [
|
|
482
|
-
/* @__PURE__ */ jsx3(
|
|
485
|
+
/* @__PURE__ */ jsx3(Icon2, { className: "h-[17px] w-[17px] shrink-0" }),
|
|
483
486
|
showLabel && /* @__PURE__ */ jsx3("span", { className: "text-sm font-medium", children: label }),
|
|
484
487
|
showLabel && /* @__PURE__ */ jsx3(
|
|
485
488
|
ChevronRightIcon,
|
|
@@ -555,7 +558,7 @@ function SubItemsSkeleton() {
|
|
|
555
558
|
return /* @__PURE__ */ jsx3("div", { className: "flex flex-col gap-1.5 px-2 py-1.5", children: widths.map((w, i) => /* @__PURE__ */ jsx3(Skeleton, { className: cn("h-4", w) }, i)) });
|
|
556
559
|
}
|
|
557
560
|
function RailExpandable({
|
|
558
|
-
icon:
|
|
561
|
+
icon: Icon2,
|
|
559
562
|
label,
|
|
560
563
|
href,
|
|
561
564
|
isActive,
|
|
@@ -694,7 +697,7 @@ function RailExpandable({
|
|
|
694
697
|
if (!e.currentTarget.contains(e.relatedTarget)) scheduleClose();
|
|
695
698
|
},
|
|
696
699
|
children: [
|
|
697
|
-
href ? /* @__PURE__ */ jsx3(Link, { href, to: href, onClick: onNavigate, "aria-label": label, className: triggerClasses, children: /* @__PURE__ */ jsx3(
|
|
700
|
+
href ? /* @__PURE__ */ jsx3(Link, { href, to: href, onClick: onNavigate, "aria-label": label, className: triggerClasses, children: /* @__PURE__ */ jsx3(Icon2, { className: "h-[17px] w-[17px] shrink-0" }) }) : /* @__PURE__ */ jsx3("button", { type: "button", "aria-label": label, "aria-haspopup": "menu", "aria-expanded": open, className: triggerClasses, children: /* @__PURE__ */ jsx3(Icon2, { className: "h-[17px] w-[17px] shrink-0" }) }),
|
|
698
701
|
open && coords !== null && typeof document !== "undefined" && createPortal2(
|
|
699
702
|
/* @__PURE__ */ jsxs2(
|
|
700
703
|
"div",
|
|
@@ -751,7 +754,7 @@ function RailExpandable({
|
|
|
751
754
|
className: "relative flex h-9 w-9 shrink-0 items-center justify-center rounded-md focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
752
755
|
children: [
|
|
753
756
|
/* @__PURE__ */ jsx3(
|
|
754
|
-
|
|
757
|
+
Icon2,
|
|
755
758
|
{
|
|
756
759
|
className: "h-[17px] w-[17px] shrink-0 opacity-100 transition-opacity duration-150 group-hover/exp:opacity-0"
|
|
757
760
|
}
|
|
@@ -871,7 +874,7 @@ function AppearanceMenuSection({ appearance, divider = true }) {
|
|
|
871
874
|
] })
|
|
872
875
|
] }),
|
|
873
876
|
/* @__PURE__ */ jsx3(DropdownMenuSubContent, { sideOffset: 6, className: "min-w-[12rem]", children: modes.map((m) => {
|
|
874
|
-
const { label, Icon } = APPEARANCE_META[m];
|
|
877
|
+
const { label, Icon: Icon2 } = APPEARANCE_META[m];
|
|
875
878
|
const active = appearance.value === m;
|
|
876
879
|
return /* @__PURE__ */ jsxs2(
|
|
877
880
|
DropdownMenuItem,
|
|
@@ -882,7 +885,7 @@ function AppearanceMenuSection({ appearance, divider = true }) {
|
|
|
882
885
|
},
|
|
883
886
|
className: "gap-3 py-2 text-[14px]",
|
|
884
887
|
children: [
|
|
885
|
-
/* @__PURE__ */ jsx3("span", { "aria-hidden": "true", className: "inline-flex shrink-0", children: /* @__PURE__ */ jsx3(
|
|
888
|
+
/* @__PURE__ */ jsx3("span", { "aria-hidden": "true", className: "inline-flex shrink-0", children: /* @__PURE__ */ jsx3(Icon2, { className: "h-[18px] w-[18px]" }) }),
|
|
886
889
|
/* @__PURE__ */ jsx3("span", { className: "flex-1", children: label }),
|
|
887
890
|
active && /* @__PURE__ */ jsx3("span", { "aria-hidden": "true", className: "inline-flex shrink-0 text-[var(--accent-text)]", children: /* @__PURE__ */ jsx3(Check, { className: "h-[18px] w-[18px]" }) })
|
|
888
891
|
]
|
|
@@ -1941,6 +1944,283 @@ function PlanCards({ plans, className }) {
|
|
|
1941
1944
|
] });
|
|
1942
1945
|
}
|
|
1943
1946
|
|
|
1947
|
+
// src/dashboard/backend-selector.tsx
|
|
1948
|
+
import { ChevronDown } from "lucide-react";
|
|
1949
|
+
import * as Select from "@radix-ui/react-select";
|
|
1950
|
+
import { jsx as jsx14, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1951
|
+
function BackendSelector({
|
|
1952
|
+
backends,
|
|
1953
|
+
selected,
|
|
1954
|
+
onChange,
|
|
1955
|
+
variant = "pill",
|
|
1956
|
+
label = "Model",
|
|
1957
|
+
placeholder = "Select a model",
|
|
1958
|
+
className,
|
|
1959
|
+
triggerClassName
|
|
1960
|
+
}) {
|
|
1961
|
+
const current = backends.find((b) => b.type === selected);
|
|
1962
|
+
const triggerText = current?.label ?? placeholder;
|
|
1963
|
+
const ariaLabel = label ? `${label}: ${triggerText}` : triggerText;
|
|
1964
|
+
const trigger = variant === "pill" ? /* @__PURE__ */ jsxs13(
|
|
1965
|
+
Select.Trigger,
|
|
1966
|
+
{
|
|
1967
|
+
"aria-label": ariaLabel,
|
|
1968
|
+
className: cn(
|
|
1969
|
+
"inline-flex h-8 items-center gap-1.5 rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container",
|
|
1970
|
+
"px-2.5 text-xs font-medium text-foreground shadow-sm",
|
|
1971
|
+
"transition-colors duration-[var(--transition-fast)]",
|
|
1972
|
+
"hover:border-[var(--md3-outline-variant)] hover:bg-surface-container-high",
|
|
1973
|
+
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1974
|
+
"data-[state=open]:border-[var(--md3-outline)] data-[state=open]:bg-surface-container-high",
|
|
1975
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1976
|
+
triggerClassName
|
|
1977
|
+
),
|
|
1978
|
+
children: [
|
|
1979
|
+
current?.icon,
|
|
1980
|
+
/* @__PURE__ */ jsx14("span", { className: cn("truncate max-w-[140px]", current ? void 0 : "text-muted-foreground"), children: triggerText }),
|
|
1981
|
+
current?.description && /* @__PURE__ */ jsx14("span", { className: "sr-only", children: current.description }),
|
|
1982
|
+
/* @__PURE__ */ jsx14(Select.Icon, { asChild: true, children: /* @__PURE__ */ jsx14(ChevronDown, { className: "h-3 w-3 shrink-0 text-muted-foreground transition-transform duration-[var(--transition-fast)] data-[state=open]:rotate-180" }) })
|
|
1983
|
+
]
|
|
1984
|
+
}
|
|
1985
|
+
) : /* @__PURE__ */ jsxs13(
|
|
1986
|
+
Select.Trigger,
|
|
1987
|
+
{
|
|
1988
|
+
"aria-label": ariaLabel,
|
|
1989
|
+
className: cn(
|
|
1990
|
+
"flex w-full items-center justify-between gap-2 rounded-[var(--radius-md)]",
|
|
1991
|
+
"border border-[var(--md3-outline-variant)] bg-surface-container px-3 py-2.5 text-sm text-left",
|
|
1992
|
+
"transition-colors duration-[var(--transition-fast)]",
|
|
1993
|
+
"hover:border-[var(--md3-outline-variant)] hover:bg-surface-container-high",
|
|
1994
|
+
"focus:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1995
|
+
"data-[state=open]:border-[var(--md3-outline)] data-[state=open]:bg-surface-container-high",
|
|
1996
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
1997
|
+
triggerClassName
|
|
1998
|
+
),
|
|
1999
|
+
children: [
|
|
2000
|
+
/* @__PURE__ */ jsxs13("span", { className: "flex min-w-0 flex-1 items-center gap-2", children: [
|
|
2001
|
+
current?.icon,
|
|
2002
|
+
/* @__PURE__ */ jsx14("span", { className: cn("min-w-0 truncate", current ? "font-medium text-foreground" : "text-muted-foreground"), children: triggerText }),
|
|
2003
|
+
current?.description && /* @__PURE__ */ jsx14("span", { className: "sr-only", children: current.description })
|
|
2004
|
+
] }),
|
|
2005
|
+
/* @__PURE__ */ jsx14(Select.Icon, { asChild: true, children: /* @__PURE__ */ jsx14(ChevronDown, { className: "h-4 w-4 shrink-0 text-muted-foreground transition-transform duration-[var(--transition-fast)] data-[state=open]:rotate-180" }) })
|
|
2006
|
+
]
|
|
2007
|
+
}
|
|
2008
|
+
);
|
|
2009
|
+
return /* @__PURE__ */ jsxs13("div", { className: cn(variant === "field" ? "space-y-1.5" : "inline-flex", className), children: [
|
|
2010
|
+
variant === "field" && label && /* @__PURE__ */ jsx14("label", { className: "block text-xs font-medium text-muted-foreground uppercase tracking-[0.06em]", children: label }),
|
|
2011
|
+
/* @__PURE__ */ jsxs13(Select.Root, { value: selected, onValueChange: onChange, children: [
|
|
2012
|
+
trigger,
|
|
2013
|
+
/* @__PURE__ */ jsx14(Select.Portal, { children: /* @__PURE__ */ jsx14(
|
|
2014
|
+
Select.Content,
|
|
2015
|
+
{
|
|
2016
|
+
position: "popper",
|
|
2017
|
+
sideOffset: 4,
|
|
2018
|
+
className: cn(
|
|
2019
|
+
"z-50 overflow-hidden",
|
|
2020
|
+
variant === "pill" ? "min-w-[240px] max-w-[320px]" : "w-[var(--radix-select-trigger-width)]",
|
|
2021
|
+
"rounded-[var(--radius-md)] border border-[var(--md3-outline-variant)]",
|
|
2022
|
+
"bg-surface-container-highest shadow-[0_8px_30px_rgba(0,0,0,0.45)] ring-1 ring-[#ffffff14]",
|
|
2023
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
2024
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
2025
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
2026
|
+
"data-[side=bottom]:slide-in-from-top-1"
|
|
2027
|
+
),
|
|
2028
|
+
children: /* @__PURE__ */ jsx14(Select.Viewport, { className: "p-1", children: backends.map((backend) => /* @__PURE__ */ jsxs13(
|
|
2029
|
+
Select.Item,
|
|
2030
|
+
{
|
|
2031
|
+
value: backend.type,
|
|
2032
|
+
className: cn(
|
|
2033
|
+
"relative flex cursor-pointer select-none items-start gap-2.5 rounded-[var(--radius-sm)]",
|
|
2034
|
+
"px-3 py-2 text-sm outline-none",
|
|
2035
|
+
"transition-colors duration-[var(--transition-fast)]",
|
|
2036
|
+
"hover:bg-accent/50 focus:bg-accent/50",
|
|
2037
|
+
"data-[state=checked]:bg-[var(--accent-surface-soft)] data-[state=checked]:text-[var(--brand-primary)]"
|
|
2038
|
+
),
|
|
2039
|
+
children: [
|
|
2040
|
+
backend.icon && /* @__PURE__ */ jsx14("span", { className: "mt-0.5 shrink-0", children: backend.icon }),
|
|
2041
|
+
/* @__PURE__ */ jsxs13("span", { className: "flex min-w-0 flex-col", children: [
|
|
2042
|
+
/* @__PURE__ */ jsx14(Select.ItemText, { children: /* @__PURE__ */ jsx14("span", { className: "font-medium", children: backend.label }) }),
|
|
2043
|
+
backend.description && /* @__PURE__ */ jsx14("span", { className: "mt-0.5 text-xs text-muted-foreground data-[state=checked]:text-[var(--accent-text)]", children: backend.description })
|
|
2044
|
+
] })
|
|
2045
|
+
]
|
|
2046
|
+
},
|
|
2047
|
+
backend.type
|
|
2048
|
+
)) })
|
|
2049
|
+
}
|
|
2050
|
+
) })
|
|
2051
|
+
] })
|
|
2052
|
+
] });
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
// src/dashboard/harness-logo.tsx
|
|
2056
|
+
import { Bot, Plug, Terminal as Terminal2 } from "lucide-react";
|
|
2057
|
+
|
|
2058
|
+
// node_modules/.pnpm/@lobehub+icons-static-svg@1.94.0/node_modules/@lobehub/icons-static-svg/icons/amp.svg
|
|
2059
|
+
var amp_default = 'data:image/svg+xml,<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Amp</title><path d="M15.087 23.18L12.03 24l-2.097-7.823-5.738 5.738-2.251-2.251 5.718-5.719-7.769-2.082.82-3.057 11.294 3.08 3.08 11.295z"></path><path d="M19.505 18.762l-3.057.82-2.564-9.573-9.572-2.564.819-3.057 11.295 3.079 3.08 11.295z"></path><path d="M23.893 14.374l-3.057.82-2.565-9.572L8.7 3.057 9.52 0l11.295 3.08 3.079 11.294z"></path></svg>';
|
|
2060
|
+
|
|
2061
|
+
// node_modules/.pnpm/@lobehub+icons-static-svg@1.94.0/node_modules/@lobehub/icons-static-svg/icons/claudecode.svg
|
|
2062
|
+
var claudecode_default = 'data:image/svg+xml,<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Claude Code</title><path clip-rule="evenodd" d="M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z"></path></svg>';
|
|
2063
|
+
|
|
2064
|
+
// node_modules/.pnpm/@lobehub+icons-static-svg@1.94.0/node_modules/@lobehub/icons-static-svg/icons/codex.svg
|
|
2065
|
+
var codex_default = 'data:image/svg+xml,<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Codex</title><path clip-rule="evenodd" d="M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"></path></svg>';
|
|
2066
|
+
|
|
2067
|
+
// node_modules/.pnpm/@lobehub+icons-static-svg@1.94.0/node_modules/@lobehub/icons-static-svg/icons/hermesagent.svg
|
|
2068
|
+
var hermesagent_default = 'data:image/svg+xml,<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>Hermes Agent</title><path d="M5.938 12.835c.127-.039.285.02.373.143.028.038.036.092.046.14.003.014-.02.033-.04.05-.124-.098-.24-.194-.354-.291-.011-.01-.016-.027-.025-.042zM8.396 9.412c.195-.032.39-.06.588-.05a.54.54 0 01.148.026c.202.071.402.147.601.224.028.01.05.036.075.055l-.013.027a9.203 9.203 0 01-.26-.089c-.115-.038-.213-.077-.315-.098-.25-.05-.25-.046-.292-.014l.574.144c.275.139.55.276.823.417.042.022.09.057.107.098.026.06.063.076.117.072.066-.006.132-.017.213-.027l-.04.086c.051.08.142.02.216.064-.074.13-.247.09-.334.199l.061.074-.12.087c0 .106-.038.168-.306.243l.026.085-.196.042.07.124h-.25l-.007.137c-.081-.01-.161-.018-.244-.027l-.053.123c-.027-.008-.052-.011-.073-.023-.067-.038-.128-.056-.195.006-.019.017-.063.014-.093.008-.026-.006-.05-.029-.07-.042-.11.095-.11.095-.208.003-.057.046-.12.074-.186.011-.063.027-.123-.02-.178-.014-.07.007-.097-.035-.133-.07l-.13.033c-.013-.236-.194-.19-.34-.203.005-.072.05-.092.095-.094a.474.474 0 01.159.022c.164.05.32.12.496.138.203.021.405.029.601-.015.265-.059.52-.149.707-.365.049-.056.083-.127.117-.195.019-.038.02-.084-.02-.116a1.397 1.397 0 00-.382-.217c.024.12-.031.182-.115.221 0 .014-.004.025 0 .03.08.115.084.16-.007.267a1.39 1.39 0 01-.218.211.477.477 0 01-.641-.05 1.36 1.36 0 01-.133-.152c-.078-.107-.076-.108-.033-.236-.165-.08-.128-.226-.104-.364.008-.05.028-.096.049-.163-.04.014-.067.017-.087.032a.897.897 0 00-.316.357c-.007.016-.01.034-.02.047-.012.015-.034.038-.045.035-.02-.006-.037-.027-.05-.045-.008-.012-.007-.032-.012-.057h-.126l.053-.172a14.82 14.82 0 00-.039-.049l.11-.284c-.06.026-.091.044-.124.051-.03.007-.064 0-.095 0 0-.031-.01-.07.004-.092.149-.22.305-.428.593-.476z"></path><path d="M8.06 10.788c-.003-.038-.004-.075.037-.062.016.006.034.048.028.067-.01.04-.038.032-.064-.005z"></path><path clip-rule="evenodd" d="M11.981.009c.226-.012.453-.011.679 0 .247.01.495.024.74.062.401.064.798.157 1.19.273.463.138.92.299 1.356.511a7.31 7.31 0 012.948 2.642c.292.469.536.963.739 1.479.219.556.446 1.11.623 1.683.204.654.329 1.326.458 1.997.097.504.182 1.01.29 1.511.156.722.329 1.44.494 2.16.186.812.4 1.615.63 2.415.102.355.193.713.282 1.072.11.436.202.876.254 1.323.031.278.066.557.073.837a7.56 7.56 0 01-.017.88c-.037.413-.1.818-.226 1.212a5.017 5.017 0 01-.915 1.649l-.13.156.018.023c.043-.023.088-.041.127-.068.2-.138.373-.307.531-.49.4-.46.721-.973.975-1.529a3.59 3.59 0 00.325-1.72c-.024-.424-.097-.834-.3-1.213-.013-.027-.015-.06-.03-.121.05.035.082.048.101.072.107.13.22.258.315.398.33.494.46 1.052.486 1.64a3.75 3.75 0 01-.47 1.97c-.36.655-.887 1.14-1.526 1.506-.193.111-.394.21-.595.308-.157.078-.248.211-.318.365a.522.522 0 00-.033.406.359.359 0 01.013.139c-.005.077-.077.155-.14.162-.054.006-.125-.043-.15-.116a1.206 1.206 0 01-.06-.233c-.04-.314-.155-.6-.308-.87a3.906 3.906 0 00-.73-.91 2.129 2.129 0 00-.897-.524 4.093 4.093 0 00-.692-.131c-.075-.008-.15-.04-.22.01.18.06.363.11.538.18.434.173.82.43 1.18.728.308.255.58.543.794.884.098.155.186.315.227.496.027.123.042.25.067.375.013.062-.002.109-.053.144-.047.033-.122.034-.163-.01a.455.455 0 01-.08-.14c-.03-.073-.038-.159-.078-.225a7.314 7.314 0 00-1.423-1.664c-.16-.137-.329-.26-.537-.323-.376-.114-.753-.203-1.15-.154-.213.025-.427.032-.64.053a1.6 1.6 0 00-.736.278 5.14 5.14 0 00-.834.72c-.329.342-.642.699-.955 1.055-.136.155-.264.319-.314.531a5.227 5.227 0 00-.012.051.096.096 0 01-.09.076h-.31c-.046 0-.082-.048-.072-.094.023-.108.045-.216.07-.324.075-.325.19-.635.368-.917.024-.039.04-.088.104-.08l.01.049.027.077c.28-.435.571-.834.996-1.135.283-.204.584-.378.89-.55a.196.196 0 00-.098-.002c-.162.043-.325.084-.485.134-.402.124-.764.33-1.11.566-.147.1-.298.193-.414.333a7.314 7.314 0 00-1.07 1.767.845.845 0 00-.04.12.075.075 0 01-.072.056h-.494c-.04 0-.062-.051-.036-.082.123-.14.246-.282.377-.415.275-.281.58-.532.777-.884.027-.048.063-.09.095-.135.238-.333.54-.607.818-.902.082-.086.175-.16.26-.24.029-.027.053-.057.079-.085l-.018-.025-.135.041c-.034.017-.07.031-.102.05-.248.144-.494.292-.743.433-.408.23-.825.439-1.209.711-.281.2-.591.358-.889.533-.02.012-.044.015-.08.028-.015-.135.143-.201.108-.336-.033.014-.064.02-.085.038-.111.096-.227.19-.328.296-.148.157-.284.325-.425.488-.125.143-.25.286-.373.431A.153.153 0 019.89 24H8.762a.316.316 0 00.016-.042c.028-.09.085-.172.083-.28-.091-.018-.162.001-.212.077a4.45 4.45 0 00-.136.215c-.01.016-.024.03-.042.03h-.093c-.019 0-.029-.022-.017-.037.071-.088.14-.178.209-.268.001-.002-.006-.012-.012-.024-.014.004-.03.006-.045.013-.176.09-.352.181-.527.274a.363.363 0 01-.168.042H5.202c-.026 0-.039-.036-.019-.053.21-.178.402-.374.558-.605.335-.496.538-1.047.667-1.629.004-.02-.003-.043-.006-.091-.037.048-.059.072-.076.1a1.943 1.943 0 01-.334.415c-.28.258-.59.448-.983.464-.297.012-.588 0-.865-.127-.46-.21-.722-.57-.794-1.072-.025-.17-.017-.171-.182-.219A3.513 3.513 0 011.97 20.6a2.286 2.286 0 01-.808-1.13 3.569 3.569 0 01-.16-1.245c.002-.034.016-.067.024-.1.032.023.046.043.05.066.033.153.059.308.096.46.086.355.257.664.516.92.258.256.571.419.91.532.358.118.717.138 1.07-.016a1.89 1.89 0 00.621-.452c.328-.348.533-.76.648-1.223.009-.034.005-.071.007-.11-.015.006-.026.006-.03.011-.031.05-.064.1-.093.152-.284.502-.679.887-1.196 1.135-.351.17-.718.255-1.11.159a1.607 1.607 0 01-.971-.64 2.006 2.006 0 01-.368-.924 2.903 2.903 0 01.02-.886c.05-.439.466-1.17.742-1.271-.02.063-.035.112-.053.16-.043.116-.097.227-.13.345a1.901 1.901 0 00-.05.82c.033.212.09.416.204.6.147.236.346.407.62.465.11.023.225.014.338.018a.576.576 0 00.386-.131c.164-.128.282-.292.366-.481.168-.375.24-.777.309-1.179.05-.296.093-.594.133-.893.039-.281.071-.563.104-.845.026-.232.048-.464.074-.696.024-.228.052-.455.076-.683.024-.227.047-.455.069-.683.013-.14.022-.28.034-.42l.037-.417c.022-.25.041-.5.065-.748.008-.082-.02-.132-.09-.177a2.46 2.46 0 01-.492-.418c-.1-.109-.188-.228-.282-.342-.035-.042-.056-.097-.116-.118a2.084 2.084 0 00.275.597c.06.092.131.176.196.265.063.086.182.115.234.226-.028.003-.046.01-.06.006a4.74 4.74 0 01-.22-.057 2.71 2.71 0 01-1.287-.819c-.435-.487-.656-1.076-.71-1.723a5.206 5.206 0 01.014-1.06c.072-.602.22-1.186.45-1.745.155-.376.338-.741.526-1.102.205-.393.466-.75.765-1.076.512-.559 1.104-1.024 1.726-1.448.717-.49 1.478-.898 2.277-1.233C8.244.828 8.767.632 9.31.494c.655-.166 1.31-.33 1.982-.415.229-.03.458-.058.688-.07zm-1.847 22.82c-.07.06-.147.111-.207.18-.238.27-.464.549-.668.869l-.044.108a.177.177 0 00.093-.057c.174-.19.351-.378.519-.574.104-.122.195-.255.288-.386.024-.034.03-.08.046-.12l-.027-.02zm1.65-3.695a5.51 5.51 0 00-.653.593l-.37.386a.963.963 0 01-.377.25 1.372 1.372 0 01-.467.09c-.044 0-.087.006-.151.012.028.058.043.097.064.131.15.242.301.482.45.724.136.22.276.438.399.666.068.125.105.267.156.404.077.027.14-.018.202-.048.29-.135.579-.274.867-.412.213-.101.437-.186.636-.31.347-.215.68-.455 1.018-.685.015-.01.026-.028.042-.046-.023-.019-.038-.037-.056-.044-.287-.111-.527-.3-.77-.482a5.319 5.319 0 01-.506-.42 1.757 1.757 0 01-.41-.653c-.019-.049-.045-.095-.075-.156zm-5.847.264c-.06.096-.097.194-.132.293a3.38 3.38 0 01-.555 1.01c-.2.25-.455.412-.762.493-.23.06-.464.076-.7.07-.048-.002-.097.002-.158.005.016.04.021.066.035.085.1.145.23.246.4.295.157.046.316.034.498.023.181-.037.343-.115.485-.234.238-.199.402-.454.536-.732.175-.363.264-.751.342-1.144.01-.053.008-.11.011-.164zm14.945-4.586c.008.029.016.057.027.107.024.155.051.31.072.464.03.219.067.437.078.657.017.344.027.689-.014 1.033-.037.315-.063.633-.116.946a6.153 6.153 0 01-.46 1.518c-.008.018-.01.039-.02.082.047-.03.077-.042.098-.064.085-.083.17-.167.248-.255.271-.305.458-.66.596-1.043.18-.498.228-1.011.145-1.531-.103-.65-.33-1.263-.597-1.881a9.055 9.055 0 00-.024-.055l-.033.022zM5.797 8.29a.26.26 0 00.018.153c.124.251.25.501.379.75.025.049.066.09.03.163-.284.06-.578.119-.88.255.059.038.097.06.132.087.042.032.112.058.09.12-.01.033-.075.048-.117.072.017.01.043.021.067.036.166.102.33.207.447.368.138.192.229.404.188.644-.079.469-.306.85-.69 1.132-.054.04-.106.083-.161.122a.243.243 0 00-.103.245.77.77 0 00.055.195c.083.196.22.35.375.492.083.076.159.164.222.257a.37.37 0 01.025.377c-.023.05-.05.099-.076.148-.03.06-.028.111.022.162.041.042.08.089.112.138.038.058.078.079.147.05a.486.486 0 01.333-.006c.16.046.302.126.444.21.13.077.264.149.4.219.067.035.14.05.219.026.071-.022.124.01.145.076.02.064-.003.108-.074.139-.07.03-.137.063-.209.088-.1.035-.201.073-.314.077-.013-.107.11-.088.127-.159-.206-.126-.643-.145-.801-.034.063.112.035.21-.096.313-.13-.1-.025-.202.002-.3a.209.209 0 00-.249.17c-.015.101.067.216.178.224.108.007.218-.005.326-.012.06-.005.12-.027.199 0-.103.123-.248.127-.357.19.002.05.07.086.019.131-.053.048-.095-.001-.132-.03-.08-.063-.16-.126-.231-.197a.474.474 0 01-.157-.311.52.52 0 00-.043-.172c-.032-.074-.032-.137.033-.19-.018-.03-.028-.053-.045-.072a1.222 1.222 0 01-.196-.369c-.053-.137-.046-.264.048-.381.024-.03.05-.06.064-.095a.664.664 0 00.047-.168c.017-.165-.064-.287-.182-.387-.186-.156-.36-.322-.46-.551-.005-.011-.024-.017-.037-.026-.011.017-.024.027-.025.038-.019.185-.045.37-.052.557-.014.377.058.743.162 1.104.118.41.289.798.488 1.173.267.502.537 1.002.812 1.5.055.098.13.189.208.27.198.202.452.272.724.273.202 0 .404-.006.605-.026.295-.03.59-.073.884-.113.183-.025.365-.057.548-.08.21-.026.38.073.522.21.16.156.305.327.447.5.22.265.397.56.554.867.05.098.07.1.147.03.13-.121.26-.242.394-.36.067-.059.088-.12.067-.213a3.535 3.535 0 01-.085-.796c.002-.157.006-.314.018-.471.015-.224.03-.45.06-.672a59.114 59.114 0 01.362-2.298c.087-.493.182-.984.268-1.477.06-.347.118-.694.162-1.043.034-.273.055-.55.063-.825.011-.332.003-.665.002-.998 0-.077.004-.155-.01-.23-.028-.142-.01-.155-.162-.19a5.826 5.826 0 00-.607-.107c-.146-.018-.207-.053-.221-.19-.006-.049-.025-.098-.041-.146-.009-.025-.024-.048-.046-.09l-.025.264c-.009.096-.029.116-.127.115-.055 0-.11-.008-.164-.008-.476 0-.952-.008-1.426.032-.095.008-.173-.015-.226-.103-.04-.066-.088-.126-.134-.186-.063-.084-.086-.093-.182-.06-.195.068-.388.138-.582.21a2.71 2.71 0 00-.675.394.986.986 0 01-.323.168c-.033.01-.07.008-.127.013.02-.066.024-.114.047-.15.064-.105.135-.205.205-.306.023-.033.049-.063.073-.095l-.015-.023-.201.037c-.146.04-.296.07-.437.122-.148.053-.266.023-.386-.072a3.623 3.623 0 01-.733-.786l-.093-.132zm8.592 8.963l-.147.09c-.22.134-.44.266-.659.402-.093.058-.184.12-.27.188-.085.07-.124.161-.072.272.047.1.093.2.147.294.047.08.124.138.213.147.11.01.228.012.336-.012.217-.05.372-.205.528-.357a.291.291 0 00.087-.308c-.046-.18-.079-.365-.118-.547-.011-.052-.027-.103-.045-.169zm-.257-2.409c-.12.291-.205.597-.325.91-.151.433-.294.87-.435 1.323.036-.01.054-.01.067-.018.261-.16.522-.324.785-.484.054-.033.071-.078.065-.138-.012-.13-.024-.262-.034-.393l-.068-.886c-.008-.103-.02-.206-.029-.31-.009 0-.017-.002-.026-.004zm3.081-8.13l.099.285c.08.231.159.463.24.714l.58 1.952c.187.63.372 1.262.558 1.893.114.382.235.762.343 1.146.072.257.126.519.186.799.044.206.087.413.127.64.034.106.023.226.077.325l.025-.006-.068-.362c-.038-.206-.077-.412-.113-.638-.015-.07-.029-.141-.046-.211-.095-.396-.177-.796-.29-1.187-.196-.685-.413-1.364-.618-2.046-.165-.549-.322-1.1-.488-1.648-.069-.227-.15-.45-.226-.695l-.117-.336c-.037-.107-.075-.216-.115-.322-.04-.106-.084-.21-.127-.314a7.558 7.558 0 01-.027.01zM6.225 14.304c-.063-.001-.115.014-.134.083a.35.35 0 00.41.012 4.533 4.533 0 00-.276-.095zM5.23 11.98c-.026-.027-.057-.048-.075.002-.012.032-.007.07-.01.113.082-.037.082-.037.085-.115zm.062-1.189a.135.135 0 00-.088.056.197.197 0 00-.025.11c.005.152.01.306.026.457a.751.751 0 00.066.218c.061.136.157.167.288.101.055-.027.06-.054.025-.11a4.52 4.52 0 01-.129-.211c-.015-.068-.066-.131-.033-.207.04-.09-.076-.116-.074-.19V10.874c-.003-.038-.006-.087-.056-.083zm-.017-.968a.867.867 0 00-.467.127c-.076.045-.084.07-.05.158.034.087.07.173.115.254.064.117.09.125.21.077a.657.657 0 01.336-.053c.202.022.357.136.504.264l.092.077c.007-.006.014-.013.022-.018-.019-.105-.035-.226-.149-.264-.157-.053-.324-.075-.508-.117l-.24-.005c.24-.169.452-.044.687.009-.063-.115-.153-.147-.23-.193-.082-.05-.17-.092-.25-.144-.06-.037-.12-.08-.072-.172zm10.233.325c-.23-.01-.427.08-.608.211-.034.026-.06.065-.105.117.087.026.15.046.232.065.044-.015.088-.03.13-.046.306-.114.61-.115.904.031.126.063.237.04.366-.005-.02-.031-.03-.054-.045-.071a.986.986 0 00-.448-.273c-.14-.044-.284-.024-.426-.03zM7.99 6.483a.308.308 0 00.002.133c.08.321.156.643.242.962.104.387.27.75.456 1.103.02.037.061.08.098.087a.404.404 0 00.253-.051l-.472-.84c-.23-.448-.405-.92-.579-1.394zM10.397.497c-.2-.008-.405.004-.603.034-.236.035-.47.087-.7.152-.287.08-.569.18-.852.273-.04.013-.074.038-.11.058.028.014.05.018.07.014.287-.068.58-.085.873-.09.134-.002.269.009.402.025.19.024.382.048.57.09.456.104.874.3 1.265.556.464.306.888.66 1.257 1.078.205.232.395.475.56.739.17.274.315.561.449.856.273.601.456 1.232.6 1.876.04.173.07.348.1.524.017.104.065.167.17.19.122.028.2.105.22.251-.003.102-.06.174-.129.24a1.065 1.065 0 00-.268.358.164.164 0 00.083-.039c.08-.086.162-.172.235-.265a.56.56 0 00.13-.333c.009-.05.022-.1.024-.15.007-.124-.017-.15-.143-.168-.025-.004-.049-.014-.073-.015-.082-.007-.125-.063-.137-.131-.033-.198-.004-.355.247-.408.086-.018.174-.03.26-.042.158-.023.315-.053.473-.067.14-.012.19.033.226.167.008.029.018.057.021.087.019.179-.008.225-.141.288-.027.013-.055.024-.078.042a.148.148 0 00-.051.067c-.039.144.073.382.206.445l.673.32c.023.011.05.015.075.023l.018-.026c-.015-.008-.032-.013-.044-.024a2.27 2.27 0 00-.544-.32 4.898 4.898 0 00-.173-.075.203.203 0 01-.126-.191c-.003-.085.045-.154.128-.187l.059-.025c.099-.044.118-.076.112-.187a.384.384 0 00-.008-.063c-.067-.294-.123-.59-.205-.88a9.478 9.478 0 00-.826-2.036 7.465 7.465 0 00-1.39-1.805 4.536 4.536 0 00-1.177-.824 3.656 3.656 0 00-1.016-.328 6.155 6.155 0 00-.712-.074zm6.719 5.955c.01.014.018.028.038.034l-.022-.044-.016.01zM4.103 3.917a.062.062 0 01-.03.012.455.455 0 01-.04.039c-.01.01-.02.02-.045.04l-.363.354c-.088.085-.17.178-.266.253-.284.22-.425.53-.544.855a.132.132 0 00-.007.071c.013.055.033.108.052.168l.074.026c-.017.056-.03.105-.047.152-.058.164-.118.327-.175.491-.005.015.008.036.019.077.08-.175.158-.33.225-.489.228-.544.484-1.074.819-1.561.09-.133.182-.266.283-.401.004-.006.007-.013.022-.03.001-.016.003-.032.015-.04l.008-.017zm12.976 2.408a.023.023 0 01.009.019.073.073 0 00-.006.01.188.188 0 00.007.02l.018.022c.002-.007.007-.016.005-.021-.003-.01-.012-.018-.02-.038a1.331 1.331 0 01-.013-.012zM4.199 4.48c-.003.004-.008.008-.027.014-.005.013-.011.025-.031.047a2.085 2.085 0 01-.124.167c-.048.07-.116.055-.181.041-.134-.028-.228.016-.287.143-.089.187-.187.37-.273.56-.049.108-.11.216-.118.36.081.003.154.007.228.008h.228a2.563 2.563 0 01-.079.264c-.01.052-.022.103-.033.155l.02.004c.018-.046.037-.092.067-.153.066-.142.13-.285.2-.426.02-.04.034-.1.116-.092 0 .043.004.084 0 .124-.005.045-.017.09-.028.143.141.043.086.174.115.269.102-.022.104-.195.248-.144v.205l.017.002.439-1.059c-.13 0-.246-.02-.358.033-.024.011-.058-.001-.108-.004.075-.15.139-.278.211-.417a.128.128 0 01.025-.036c0-.015-.001-.03.008-.038l.006-.02c-.005.006-.01.011-.028.017-.004.012-.009.024-.026.045a.085.085 0 01-.032.033c-.123.157-.09.164-.258.106-.079-.027-.078-.028-.047-.144.028-.046.056-.093.098-.15 0-.016-.001-.032.007-.042L4.2 4.48zm2.073-.67c-.003.006-.007.011-.027.016-.094.125-.194.246-.28.377-.155.238-.301.481-.451.723-.14.224-.345.368-.575.481-.017.008-.04.006-.079.011.012-.059.016-.109.033-.153a6.076 6.076 0 01.229-.518l-.007-.02a.138.138 0 01-.035.025c-.028.05-.055.1-.093.164-.26.424-.443.817-.442.95.024.004.048.011.073.013.177.013.188.007.26-.165.03-.07.077-.12.147-.15l.175-.07c.044-.018.085-.057.146-.032.003.05-.01.11.014.145.042.062.044.125.047.193.002.049.017.098.026.147.029-.034.039-.065.05-.097.142-.39.277-.782.428-1.17.1-.256.22-.504.33-.756.013-.03.013-.067.03-.092V3.81zm3.987-.34c0 .045.01.084.021.123.042.16.094.318.124.48.024.133.023.27.028.406 0 .033-.019.067-.032.11-.094-.058-.047-.158-.106-.215h-.125c-.015.072-.01.152-.046.2-.066.085-.155.154-.236.227-.043.038-.078.018-.103-.025l-.046-.087c-.065.035-.117.069-.172.093-.116.051-.235.095-.35.147-.085.038-.09.053-.07.147.014.075.034.148.047.223.013.072.05.109.123.124.233.05.462.115.657.265.058-.102.058-.102.168-.151.03-.014.06-.03.092-.042.08-.03.115-.017.15.06.023.048.041.098.066.158.06-.14-.042-.267.017-.416.157.18.24.39.375.567a.235.235 0 00.022-.098c.002-.124 0-.247.002-.371 0-.034.013-.067.02-.1l.032-.003c.11.155.13.354.226.52a3.036 3.036 0 00-.01-.392c-.004-.045 0-.074.05-.088.08.036.116.14.215.158-.03-.275-.423-1.137-.798-1.635-.114-.127-.2-.28-.34-.386zm-2.667.696c-.019.034-.03.05-.037.067-.061.185-.125.37-.18.556-.031.105-.087.169-.195.19-.09.019-.178.052-.268.073-.038.009-.089.015-.118-.003-.024-.016-.025-.069-.036-.106-.064.076-.082.087-.17.047-.133-.062-.262-.135-.393-.201-.048-.025-.093-.063-.17-.03-.043.12-.091.25-.137.382-.099.28-.087.242.095.453.046.048.102.03.154.023.054-.009.106-.03.16-.036.13-.013.26-.08.367-.015.204-.064.387-.122.571-.178.05-.015.089.005.114.054.022.042.034.093.082.121.038-.056-.013-.128.063-.178l.14.241-.042-1.46zm.278.358c-.096-.01-.107.01-.11.108-.002.038-.003.078.002.115.03.2.099.386.174.57.002.006.012.01.022.015l.078-.05c.052.036.081.088.153.088.205-.002.41.014.616.012.099-.001.158.042.205.12.018.03.024.077.088.066l-.08-.394c-.05-.195-.085-.395-.172-.589-.057.057-.114.068-.18.046a.72.72 0 00-.135-.028c-.22-.028-.44-.059-.66-.08zm10.254-1.727c.089.163.155.316.139.491-.016.168.026.342-.044.516-.047-.033-.088-.082-.112-.075-.117.035-.164-.057-.227-.115a4.772 4.772 0 01-.286-.29l-.104-.113a4.856 4.856 0 01-.023.019c.035.046.07.093.11.156.04.064.084.127.122.193.034.058.065.118.031.205-.082-.01-.164-.019-.246-.032-.06-.01-.101 0-.124.07-.031.098-.037.096-.15.09.02.042.036.08.057.116.041.074.03.138-.03.196-.06.06-.118.122-.178.181a.175.175 0 01-.185.046c-.222-.061-.447-.113-.67-.174-.032-.009-.063-.04-.086-.068-.03-.04-.052-.087-.08-.13-.044-.07-.09-.138-.136-.207a.18.18 0 00-.014.105c.012.127.03.253.035.38.005.1-.024.12-.121.104-.104-.017-.206-.04-.31-.058-.064-.012-.131-.028-.202.03l.081.208c.09 0 .166-.01.237.002a.819.819 0 01.458.251c.078.083.154.168.241.26l.018-.005c-.004-.006-.008-.013-.01-.04.014-.056-.062-.118.018-.178.031.03.064.057.088.09.058.078.111.159.169.257l.089.141.024-.013a2093.819 2093.819 0 01-.427-.934c.055.007.083.007.108.016.193.07.385.142.577.216.074.028.147.06.219.094.062.028.112.018.157-.033.05-.056.102-.112.154-.167.05-.051.095-.046.132.014.016.025.026.053.04.08.071.138.143.277.217.433l.159.308.025-.011c-.044-.106-.07-.218-.138-.334-.057-.182-.168-.346-.206-.545.136.034.362.326.567.732l.057.074.018-.011a1.563 1.563 0 01-.052-.127c-.046-.145-.097-.29-.136-.436-.022-.083-.036-.173.022-.26l.109.058-.026-.207.027-.016c.022.02.05.036.065.06.073.108.143.22.215.33.01.016.029.029.043.043-.036-.217-.2-.38-.229-.626l.155.112c.014-.166.012-.319.042-.465.032-.158-.023-.297-.063-.445.024.004.036.006.055.025.092.124.183.249.277.371.02.027.05.047.069.087l.04.063.019-.015a.293.293 0 01-.053-.082 27.922 27.922 0 01-.332-.49c-.221-.311-.363-.467-.485-.521zm-6.57.327c-.003.161.092.275.069.415l-.368.087c.09.139.032.237-.052.331-.05.057-.092.122-.143.178-.037.04-.046.078-.018.126l.16.275c.029.048.072.066.128.064.076-.003.152 0 .228-.001.116-.003.216.022.275.137.006.014.02.024.044.052.004-.059-.003-.098.01-.13.016-.04.04-.099.072-.108.084-.023.173-.024.26-.03.013-.001.027.018.04.029l.071.065c.019-.11-.082-.198-.024-.31l.126.04c-.026-.123-.07-.245-.071-.366 0-.123.051-.243.115-.36.107.062.16.156.234.253.183.265.36.533.494.834.165-.078.27.068.407.088-.003-.106-.133-.441-.197-.492a.142.142 0 00-.102-.028c-.06.011-.119.039-.191.063-.025-.039-.056-.078-.077-.122a3.936 3.936 0 00-.473-.783c-.076-.094-.16-.182-.228-.26l-.391.285c-.049.035-.094.03-.132-.017l-.169-.207c-.025-.03-.053-.059-.097-.108z"></path></svg>';
|
|
2069
|
+
|
|
2070
|
+
// node_modules/.pnpm/@lobehub+icons-static-svg@1.94.0/node_modules/@lobehub/icons-static-svg/icons/openclaw.svg
|
|
2071
|
+
var openclaw_default = 'data:image/svg+xml,<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>OpenClaw</title><g clip-path="url(%23a)"><path d="M9.046 7.104a.527.527 0 110 1.055.527.527 0 010-1.055z"></path><path d="M15.376 7.104a.528.528 0 110 1.056.528.528 0 010-1.056z"></path><path clip-rule="evenodd" d="M16.877 1.912c.58-.27 1.14-.323 1.616-.037a.317.317 0 01-.326.542c-.227-.136-.547-.153-1.022.068-.352.165-.765.45-1.234.866 2.683 1.17 4.4 3.5 5.148 5.921a6.421 6.421 0 00-.704.184c-.578.016-1.174.204-1.502.735-.338.55-.268 1.276.072 2.069l.005.012.007.014c.523 1.045 1.318 1.91 2.2 2.284-.912 3.274-3.44 6.144-5.972 6.988v2.109h-2.11v-2.11c-1.043.417-2.086.01-2.11 0v2.11h-2.11v-2.11c-2.531-.843-5.061-3.713-5.973-6.987.882-.373 1.678-1.238 2.2-2.284l.007-.014.006-.012c.34-.793.41-1.518.071-2.069-.327-.531-.923-.719-1.503-.735a6.409 6.409 0 00-.704-.183c.749-2.421 2.466-4.751 5.149-5.922-.47-.416-.88-.701-1.234-.866-.474-.221-.794-.204-1.021-.068a.318.318 0 01-.435-.109.317.317 0 01.109-.433c.476-.286 1.036-.233 1.615.037.49.229 1.031.628 1.621 1.182A9.924 9.924 0 0112 2.568c1.199 0 2.284.19 3.256.526.59-.554 1.13-.953 1.62-1.182zM8.835 6.577a1.266 1.266 0 100 2.532 1.266 1.266 0 000-2.532zm6.33 0a1.267 1.267 0 100 2.533 1.267 1.267 0 000-2.533z"></path><path d="M.395 13.118c-.966-1.932-.163-3.863 2.41-3.365v-.001l.05.01c.084.018.17.038.26.06.033.009.067.017.1.027.084.022.168.048.255.076l.09.027c.528 0 .95.158 1.16.501.212.343.212.87-.105 1.61-.085.17-.178.333-.276.489l-.01.017a4.967 4.967 0 01-.62.791l-.019.02c-1.092 1.117-2.496 1.336-3.295-.262z"></path><path d="M21.193 9.753c2.574-.5 3.378 1.433 2.411 3.365-.58 1.159-1.476 1.361-2.342.96l-.011-.005a2.419 2.419 0 01-.114-.056l-.019-.01a2.751 2.751 0 01-.115-.067l-.023-.014c-.035-.022-.071-.044-.106-.068l-.05-.035c-.55-.388-1.062-1.007-1.44-1.76-.276-.647-.311-1.132-.174-1.472.176-.439.636-.639 1.23-.639.032-.011.066-.02.099-.03.08-.026.16-.05.238-.072l.117-.03a5.502 5.502 0 01.3-.067z"></path></g><defs><linearGradient gradientUnits="userSpaceOnUse" id="b" x1="-.659" x2="27.023" y1=".458" y2="22.855"><stop stop-color="%23FF4D4D"></stop><stop offset="1" stop-color="%23991B1B"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="c" x1="-.659" x2="27.023" y1=".458" y2="22.855"><stop stop-color="%23FF4D4D"></stop><stop offset="1" stop-color="%23991B1B"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="d" x1="-.659" x2="27.023" y1=".458" y2="22.855"><stop stop-color="%23FF4D4D"></stop><stop offset="1" stop-color="%23991B1B"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="e" x1="-.659" x2="27.023" y1=".458" y2="22.855"><stop stop-color="%23FF4D4D"></stop><stop offset="1" stop-color="%23991B1B"></stop></linearGradient><linearGradient gradientUnits="userSpaceOnUse" id="f" x1="-.659" x2="27.023" y1=".458" y2="22.855"><stop stop-color="%23FF4D4D"></stop><stop offset="1" stop-color="%23991B1B"></stop></linearGradient><clipPath id="a"><path d="M0 0h24v24H0z"></path></clipPath></defs></svg>';
|
|
2072
|
+
|
|
2073
|
+
// node_modules/.pnpm/@lobehub+icons-static-svg@1.94.0/node_modules/@lobehub/icons-static-svg/icons/opencode.svg
|
|
2074
|
+
var opencode_default = 'data:image/svg+xml,<svg fill="currentColor" fill-rule="evenodd" height="1em" style="flex:none;line-height:1" viewBox="0 0 24 24" width="1em" xmlns="http://www.w3.org/2000/svg"><title>opencode</title><path d="M16 6H8v12h8V6zm4 16H4V2h16v20z"></path></svg>';
|
|
2075
|
+
|
|
2076
|
+
// src/dashboard/harness-logo.tsx
|
|
2077
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
2078
|
+
var HARNESS_BRAND = {
|
|
2079
|
+
opencode: { label: "OpenCode", logoUrl: opencode_default },
|
|
2080
|
+
"claude-code": { label: "Claude Code", logoUrl: claudecode_default },
|
|
2081
|
+
codex: { label: "Codex", logoUrl: codex_default },
|
|
2082
|
+
amp: { label: "AMP", logoUrl: amp_default },
|
|
2083
|
+
"kimi-code": { label: "Kimi Code", logoUrl: moonshot_default },
|
|
2084
|
+
openclaw: { label: "OpenClaw", logoUrl: openclaw_default },
|
|
2085
|
+
hermes: { label: "Hermes", logoUrl: hermesagent_default },
|
|
2086
|
+
// No published brand mark — honest lucide glyphs.
|
|
2087
|
+
"factory-droids": { label: "Factory Droids", icon: Bot },
|
|
2088
|
+
nanoclaw: { label: "NanoClaw", icon: Plug },
|
|
2089
|
+
"cli-base": { label: "CLI base", icon: Terminal2 }
|
|
2090
|
+
};
|
|
2091
|
+
function HarnessLogo({ type, size = 16, className }) {
|
|
2092
|
+
const brand = HARNESS_BRAND[type] ?? { label: type, icon: Bot };
|
|
2093
|
+
const Icon2 = brand.icon;
|
|
2094
|
+
return /* @__PURE__ */ jsx15(
|
|
2095
|
+
"span",
|
|
2096
|
+
{
|
|
2097
|
+
title: brand.label,
|
|
2098
|
+
"aria-label": brand.label,
|
|
2099
|
+
className: cn(
|
|
2100
|
+
"inline-flex shrink-0 items-center justify-center overflow-hidden rounded-full bg-background shadow-sm ring-1 ring-border",
|
|
2101
|
+
className
|
|
2102
|
+
),
|
|
2103
|
+
style: { height: size, width: size },
|
|
2104
|
+
children: brand.logoUrl ? /* @__PURE__ */ jsx15(
|
|
2105
|
+
"span",
|
|
2106
|
+
{
|
|
2107
|
+
"aria-hidden": true,
|
|
2108
|
+
className: "h-[72%] w-[72%]",
|
|
2109
|
+
style: {
|
|
2110
|
+
backgroundColor: "hsl(var(--foreground))",
|
|
2111
|
+
maskImage: cssUrl(brand.logoUrl),
|
|
2112
|
+
maskSize: "contain",
|
|
2113
|
+
maskRepeat: "no-repeat",
|
|
2114
|
+
maskPosition: "center",
|
|
2115
|
+
WebkitMaskImage: cssUrl(brand.logoUrl),
|
|
2116
|
+
WebkitMaskSize: "contain",
|
|
2117
|
+
WebkitMaskRepeat: "no-repeat",
|
|
2118
|
+
WebkitMaskPosition: "center"
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
) : Icon2 ? /* @__PURE__ */ jsx15(Icon2, { className: "h-[72%] w-[72%] text-muted-foreground" }) : null
|
|
2122
|
+
}
|
|
2123
|
+
);
|
|
2124
|
+
}
|
|
2125
|
+
function cssUrl(url) {
|
|
2126
|
+
return `url("${url.replace(/[\\"'#\n]/g, (char) => encodeURIComponent(char))}")`;
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
// src/dashboard/harness-picker.tsx
|
|
2130
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
2131
|
+
var HARNESS_OPTIONS = [
|
|
2132
|
+
{
|
|
2133
|
+
type: "opencode",
|
|
2134
|
+
label: "OpenCode",
|
|
2135
|
+
description: "Broad model support, deterministic streaming",
|
|
2136
|
+
chatCapable: true
|
|
2137
|
+
},
|
|
2138
|
+
{
|
|
2139
|
+
type: "claude-code",
|
|
2140
|
+
label: "Claude Code",
|
|
2141
|
+
description: "Native Claude skills and tools",
|
|
2142
|
+
chatCapable: true
|
|
2143
|
+
},
|
|
2144
|
+
{
|
|
2145
|
+
type: "codex",
|
|
2146
|
+
label: "Codex",
|
|
2147
|
+
description: "OpenAI's Codex CLI",
|
|
2148
|
+
chatCapable: true
|
|
2149
|
+
},
|
|
2150
|
+
{
|
|
2151
|
+
type: "amp",
|
|
2152
|
+
label: "AMP",
|
|
2153
|
+
description: "Sourcegraph's coding agent",
|
|
2154
|
+
chatCapable: true
|
|
2155
|
+
},
|
|
2156
|
+
{
|
|
2157
|
+
type: "factory-droids",
|
|
2158
|
+
label: "Factory Droids",
|
|
2159
|
+
description: "Factory's Droid agent",
|
|
2160
|
+
chatCapable: true
|
|
2161
|
+
},
|
|
2162
|
+
{
|
|
2163
|
+
type: "kimi-code",
|
|
2164
|
+
label: "Kimi Code",
|
|
2165
|
+
description: "Moonshot's Kimi Code CLI",
|
|
2166
|
+
chatCapable: true
|
|
2167
|
+
},
|
|
2168
|
+
{
|
|
2169
|
+
type: "openclaw",
|
|
2170
|
+
label: "OpenClaw",
|
|
2171
|
+
description: "Routes to Claude, Codex, or Gemini",
|
|
2172
|
+
chatCapable: true
|
|
2173
|
+
},
|
|
2174
|
+
{
|
|
2175
|
+
type: "nanoclaw",
|
|
2176
|
+
label: "NanoClaw",
|
|
2177
|
+
description: "Local socket-bridge backend",
|
|
2178
|
+
chatCapable: true
|
|
2179
|
+
},
|
|
2180
|
+
{
|
|
2181
|
+
type: "hermes",
|
|
2182
|
+
label: "Hermes",
|
|
2183
|
+
description: "Hermes inference-router agent",
|
|
2184
|
+
chatCapable: true
|
|
2185
|
+
},
|
|
2186
|
+
{
|
|
2187
|
+
type: "cli-base",
|
|
2188
|
+
label: "CLI base (no agent)",
|
|
2189
|
+
description: "Shell tools only, for non-AI scheduled tasks",
|
|
2190
|
+
chatCapable: false
|
|
2191
|
+
}
|
|
2192
|
+
];
|
|
2193
|
+
var chatCapableHarnesses = HARNESS_OPTIONS.filter((h) => h.chatCapable).map((h) => h.type);
|
|
2194
|
+
function HarnessPicker({
|
|
2195
|
+
value,
|
|
2196
|
+
onChange,
|
|
2197
|
+
available,
|
|
2198
|
+
optionsOverride,
|
|
2199
|
+
label = "Agent harness",
|
|
2200
|
+
...rest
|
|
2201
|
+
}) {
|
|
2202
|
+
const allowed = new Set(available ?? HARNESS_OPTIONS.map((h) => h.type));
|
|
2203
|
+
const backends = HARNESS_OPTIONS.filter((h) => allowed.has(h.type)).map((h) => {
|
|
2204
|
+
const override = optionsOverride?.[h.type];
|
|
2205
|
+
return {
|
|
2206
|
+
type: h.type,
|
|
2207
|
+
label: override?.label ?? h.label,
|
|
2208
|
+
description: override?.description ?? h.description,
|
|
2209
|
+
icon: /* @__PURE__ */ jsx16(HarnessLogo, { type: h.type, size: 16 })
|
|
2210
|
+
};
|
|
2211
|
+
});
|
|
2212
|
+
return /* @__PURE__ */ jsx16(
|
|
2213
|
+
BackendSelector,
|
|
2214
|
+
{
|
|
2215
|
+
backends,
|
|
2216
|
+
selected: value,
|
|
2217
|
+
onChange: (next) => onChange(next),
|
|
2218
|
+
label,
|
|
2219
|
+
...rest
|
|
2220
|
+
}
|
|
2221
|
+
);
|
|
2222
|
+
}
|
|
2223
|
+
|
|
1944
2224
|
// src/dashboard/dashboard-layout.tsx
|
|
1945
2225
|
import * as React9 from "react";
|
|
1946
2226
|
import { Plus as Plus2, Bell } from "lucide-react";
|
|
@@ -1965,20 +2245,20 @@ function useBrandThemeSync() {
|
|
|
1965
2245
|
}
|
|
1966
2246
|
|
|
1967
2247
|
// src/dashboard/dashboard-layout.tsx
|
|
1968
|
-
import { Fragment as Fragment9, jsx as
|
|
2248
|
+
import { Fragment as Fragment9, jsx as jsx17, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1969
2249
|
function MenuIcon({ className }) {
|
|
1970
|
-
return /* @__PURE__ */
|
|
1971
|
-
/* @__PURE__ */
|
|
1972
|
-
/* @__PURE__ */
|
|
1973
|
-
/* @__PURE__ */
|
|
1974
|
-
/* @__PURE__ */
|
|
2250
|
+
return /* @__PURE__ */ jsxs14("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, children: [
|
|
2251
|
+
/* @__PURE__ */ jsx17("title", { children: "Menu icon" }),
|
|
2252
|
+
/* @__PURE__ */ jsx17("line", { x1: "4", x2: "20", y1: "12", y2: "12" }),
|
|
2253
|
+
/* @__PURE__ */ jsx17("line", { x1: "4", x2: "20", y1: "6", y2: "6" }),
|
|
2254
|
+
/* @__PURE__ */ jsx17("line", { x1: "4", x2: "20", y1: "18", y2: "18" })
|
|
1975
2255
|
] });
|
|
1976
2256
|
}
|
|
1977
2257
|
function XIcon({ className }) {
|
|
1978
|
-
return /* @__PURE__ */
|
|
1979
|
-
/* @__PURE__ */
|
|
1980
|
-
/* @__PURE__ */
|
|
1981
|
-
/* @__PURE__ */
|
|
2258
|
+
return /* @__PURE__ */ jsxs14("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className, children: [
|
|
2259
|
+
/* @__PURE__ */ jsx17("title", { children: "Close icon" }),
|
|
2260
|
+
/* @__PURE__ */ jsx17("path", { d: "M18 6 6 18" }),
|
|
2261
|
+
/* @__PURE__ */ jsx17("path", { d: "m6 6 12 12" })
|
|
1982
2262
|
] });
|
|
1983
2263
|
}
|
|
1984
2264
|
function formatNotifDate(raw) {
|
|
@@ -1992,7 +2272,7 @@ function DefaultLink2({
|
|
|
1992
2272
|
children,
|
|
1993
2273
|
...rest
|
|
1994
2274
|
}) {
|
|
1995
|
-
return /* @__PURE__ */
|
|
2275
|
+
return /* @__PURE__ */ jsx17("a", { href: href ?? to, className, ...rest, children });
|
|
1996
2276
|
}
|
|
1997
2277
|
function DashboardLayoutInner({
|
|
1998
2278
|
children,
|
|
@@ -2052,12 +2332,12 @@ function DashboardLayoutInner({
|
|
|
2052
2332
|
);
|
|
2053
2333
|
const activePanel = panels.find((p) => p.mode === mode);
|
|
2054
2334
|
const buildSidebarContent = React9.useCallback(
|
|
2055
|
-
(showLabels, allowCollapse) => /* @__PURE__ */
|
|
2056
|
-
/* @__PURE__ */
|
|
2057
|
-
/* @__PURE__ */
|
|
2335
|
+
(showLabels, allowCollapse) => /* @__PURE__ */ jsxs14(Fragment9, { children: [
|
|
2336
|
+
/* @__PURE__ */ jsxs14(SidebarRail, { wide: showLabels, children: [
|
|
2337
|
+
/* @__PURE__ */ jsx17(
|
|
2058
2338
|
RailHeader,
|
|
2059
2339
|
{
|
|
2060
|
-
brand: /* @__PURE__ */
|
|
2340
|
+
brand: /* @__PURE__ */ jsx17(Logo, { variant, size: "sm", iconOnly: !showLabels }),
|
|
2061
2341
|
brandHref: logoHref,
|
|
2062
2342
|
collapsed: !showLabels,
|
|
2063
2343
|
onToggle: toggleRail,
|
|
@@ -2065,7 +2345,7 @@ function DashboardLayoutInner({
|
|
|
2065
2345
|
LinkComponent: Link
|
|
2066
2346
|
}
|
|
2067
2347
|
),
|
|
2068
|
-
/* @__PURE__ */
|
|
2348
|
+
/* @__PURE__ */ jsx17(
|
|
2069
2349
|
SidebarRailNav,
|
|
2070
2350
|
{
|
|
2071
2351
|
className: cn(showLabels ? "px-2" : void 0, !showLabels && allowCollapse && "cursor-pointer"),
|
|
@@ -2076,14 +2356,14 @@ function DashboardLayoutInner({
|
|
|
2076
2356
|
const isMode = modeSet.has(item.id);
|
|
2077
2357
|
const prevIsMode = i > 0 && modeSet.has(navItems[i - 1].id);
|
|
2078
2358
|
const showSep = i > 0 && isMode && !prevIsMode;
|
|
2079
|
-
return /* @__PURE__ */
|
|
2080
|
-
showSep && /* @__PURE__ */
|
|
2359
|
+
return /* @__PURE__ */ jsxs14(React9.Fragment, { children: [
|
|
2360
|
+
showSep && /* @__PURE__ */ jsx17(
|
|
2081
2361
|
RailSeparator,
|
|
2082
2362
|
{
|
|
2083
2363
|
className: showLabels ? "w-full" : void 0
|
|
2084
2364
|
}
|
|
2085
2365
|
),
|
|
2086
|
-
isMode ? /* @__PURE__ */
|
|
2366
|
+
isMode ? /* @__PURE__ */ jsx17(
|
|
2087
2367
|
RailModeButton,
|
|
2088
2368
|
{
|
|
2089
2369
|
mode: item.id,
|
|
@@ -2092,7 +2372,7 @@ function DashboardLayoutInner({
|
|
|
2092
2372
|
badge: item.badge,
|
|
2093
2373
|
showLabel: showLabels
|
|
2094
2374
|
}
|
|
2095
|
-
) : /* @__PURE__ */
|
|
2375
|
+
) : /* @__PURE__ */ jsx17(
|
|
2096
2376
|
RailButton,
|
|
2097
2377
|
{
|
|
2098
2378
|
icon: item.icon,
|
|
@@ -2100,15 +2380,15 @@ function DashboardLayoutInner({
|
|
|
2100
2380
|
isActive: activeNavId === item.id,
|
|
2101
2381
|
showLabel: showLabels,
|
|
2102
2382
|
asChild: true,
|
|
2103
|
-
children: /* @__PURE__ */
|
|
2383
|
+
children: /* @__PURE__ */ jsx17(Link, { href: item.href, to: item.href })
|
|
2104
2384
|
}
|
|
2105
2385
|
)
|
|
2106
2386
|
] }, item.id);
|
|
2107
2387
|
})
|
|
2108
2388
|
}
|
|
2109
2389
|
),
|
|
2110
|
-
/* @__PURE__ */
|
|
2111
|
-
/* @__PURE__ */
|
|
2390
|
+
/* @__PURE__ */ jsx17(SidebarRailFooter, { className: cn("border-t border-[var(--md3-outline-variant)] pt-2", showLabels && "items-stretch px-2"), children: railFooter !== void 0 ? showLabels ? /* @__PURE__ */ jsxs14("div", { className: "flex w-full items-center gap-1", children: [
|
|
2391
|
+
/* @__PURE__ */ jsx17("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsx17(
|
|
2112
2392
|
ProfileAvatar,
|
|
2113
2393
|
{
|
|
2114
2394
|
user: sidebarUser,
|
|
@@ -2122,10 +2402,10 @@ function DashboardLayoutInner({
|
|
|
2122
2402
|
children: profileMenuItems
|
|
2123
2403
|
}
|
|
2124
2404
|
) }),
|
|
2125
|
-
/* @__PURE__ */
|
|
2126
|
-
] }) : /* @__PURE__ */
|
|
2405
|
+
/* @__PURE__ */ jsx17("div", { className: "shrink-0", children: railFooter })
|
|
2406
|
+
] }) : /* @__PURE__ */ jsxs14("div", { className: "flex flex-col items-center gap-1", children: [
|
|
2127
2407
|
railFooter,
|
|
2128
|
-
/* @__PURE__ */
|
|
2408
|
+
/* @__PURE__ */ jsx17(
|
|
2129
2409
|
ProfileAvatar,
|
|
2130
2410
|
{
|
|
2131
2411
|
user: sidebarUser,
|
|
@@ -2139,7 +2419,7 @@ function DashboardLayoutInner({
|
|
|
2139
2419
|
children: profileMenuItems
|
|
2140
2420
|
}
|
|
2141
2421
|
)
|
|
2142
|
-
] }) : /* @__PURE__ */
|
|
2422
|
+
] }) : /* @__PURE__ */ jsx17(
|
|
2143
2423
|
ProfileAvatar,
|
|
2144
2424
|
{
|
|
2145
2425
|
user: sidebarUser,
|
|
@@ -2154,9 +2434,9 @@ function DashboardLayoutInner({
|
|
|
2154
2434
|
}
|
|
2155
2435
|
) })
|
|
2156
2436
|
] }),
|
|
2157
|
-
panels.length > 0 && /* @__PURE__ */
|
|
2158
|
-
/* @__PURE__ */
|
|
2159
|
-
/* @__PURE__ */
|
|
2437
|
+
panels.length > 0 && /* @__PURE__ */ jsxs14(SidebarPanel, { children: [
|
|
2438
|
+
/* @__PURE__ */ jsx17(SidebarPanelHeader, { title: activePanel?.title ?? mode }),
|
|
2439
|
+
/* @__PURE__ */ jsx17(SidebarPanelContent, { children: activePanel?.content })
|
|
2160
2440
|
] })
|
|
2161
2441
|
] }),
|
|
2162
2442
|
// biome-ignore lint/correctness/useExhaustiveDependencies: intentional — only the inputs that actually affect the sidebar tree
|
|
@@ -2189,8 +2469,8 @@ function DashboardLayoutInner({
|
|
|
2189
2469
|
[buildSidebarContent, labeledRail, railCollapsed]
|
|
2190
2470
|
);
|
|
2191
2471
|
const mobileSidebarContent = React9.useMemo(() => buildSidebarContent(true, false), [buildSidebarContent]);
|
|
2192
|
-
return /* @__PURE__ */
|
|
2193
|
-
/* @__PURE__ */
|
|
2472
|
+
return /* @__PURE__ */ jsxs14("div", { className: cn("min-h-screen bg-surface text-foreground", className), children: [
|
|
2473
|
+
/* @__PURE__ */ jsxs14(
|
|
2194
2474
|
"nav",
|
|
2195
2475
|
{
|
|
2196
2476
|
className: "fixed top-0 z-50 bg-surface-container-low border-b border-[var(--md3-outline-variant)] flex justify-between items-center px-8 h-14 font-sans text-[13px] tracking-tight transition-[left,width] duration-200 ease-in-out",
|
|
@@ -2199,10 +2479,10 @@ function DashboardLayoutInner({
|
|
|
2199
2479
|
width: hidden ? "100%" : `calc(100% - ${contentMargin}px)`
|
|
2200
2480
|
},
|
|
2201
2481
|
children: [
|
|
2202
|
-
/* @__PURE__ */
|
|
2203
|
-
/* @__PURE__ */
|
|
2482
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-8", children: [
|
|
2483
|
+
/* @__PURE__ */ jsx17(Link, { href: logoHref, to: logoHref, className: "lg:hidden flex items-center p-1 rounded-md hover:bg-surface-container-high transition-colors", children: /* @__PURE__ */ jsx17(Logo, { variant, size: "sm", iconOnly: true }) }),
|
|
2204
2484
|
topBarLeading,
|
|
2205
|
-
topNavLinks && topNavLinks.length > 0 && /* @__PURE__ */
|
|
2485
|
+
topNavLinks && topNavLinks.length > 0 && /* @__PURE__ */ jsx17("div", { className: "hidden md:flex gap-6", children: topNavLinks.map((link) => /* @__PURE__ */ jsx17(
|
|
2206
2486
|
Link,
|
|
2207
2487
|
{
|
|
2208
2488
|
href: link.href,
|
|
@@ -2216,21 +2496,21 @@ function DashboardLayoutInner({
|
|
|
2216
2496
|
link.href
|
|
2217
2497
|
)) })
|
|
2218
2498
|
] }),
|
|
2219
|
-
/* @__PURE__ */
|
|
2220
|
-
onNewSandbox && /* @__PURE__ */
|
|
2499
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center gap-4", children: [
|
|
2500
|
+
onNewSandbox && /* @__PURE__ */ jsxs14(
|
|
2221
2501
|
"button",
|
|
2222
2502
|
{
|
|
2223
2503
|
type: "button",
|
|
2224
2504
|
onClick: onNewSandbox,
|
|
2225
2505
|
className: "hidden md:flex items-center gap-2 bg-[var(--btn-primary-bg)] border border-[var(--border-accent)] text-[var(--btn-primary-text)] px-4 py-2 rounded-lg font-bold hover:bg-[var(--btn-primary-hover)] transition-all active:scale-95 text-xs",
|
|
2226
2506
|
children: [
|
|
2227
|
-
/* @__PURE__ */
|
|
2507
|
+
/* @__PURE__ */ jsx17(Plus2, { className: "h-3.5 w-3.5" }),
|
|
2228
2508
|
"New Sandbox"
|
|
2229
2509
|
]
|
|
2230
2510
|
}
|
|
2231
2511
|
),
|
|
2232
|
-
/* @__PURE__ */
|
|
2233
|
-
/* @__PURE__ */
|
|
2512
|
+
/* @__PURE__ */ jsxs14("div", { className: "relative", ref: notifRef, children: [
|
|
2513
|
+
/* @__PURE__ */ jsxs14(
|
|
2234
2514
|
"button",
|
|
2235
2515
|
{
|
|
2236
2516
|
type: "button",
|
|
@@ -2239,15 +2519,15 @@ function DashboardLayoutInner({
|
|
|
2239
2519
|
"aria-label": "Notifications",
|
|
2240
2520
|
"aria-expanded": notificationsOpen,
|
|
2241
2521
|
children: [
|
|
2242
|
-
/* @__PURE__ */
|
|
2243
|
-
(notifData?.unreadCount ?? 0) > 0 && /* @__PURE__ */
|
|
2522
|
+
/* @__PURE__ */ jsx17(Bell, { className: "h-4 w-4" }),
|
|
2523
|
+
(notifData?.unreadCount ?? 0) > 0 && /* @__PURE__ */ jsx17("span", { className: "absolute top-1 right-1 h-2 w-2 rounded-full bg-destructive" })
|
|
2244
2524
|
]
|
|
2245
2525
|
}
|
|
2246
2526
|
),
|
|
2247
|
-
notificationsOpen && /* @__PURE__ */
|
|
2248
|
-
/* @__PURE__ */
|
|
2249
|
-
/* @__PURE__ */
|
|
2250
|
-
(notifData?.unreadCount ?? 0) > 0 && notifData?.onMarkAllRead && /* @__PURE__ */
|
|
2527
|
+
notificationsOpen && /* @__PURE__ */ jsxs14("div", { className: "absolute right-0 top-full mt-2 w-80 rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container-highest shadow-[0_8px_30px_rgba(0,0,0,0.45)] ring-1 ring-[#ffffff14] z-50", children: [
|
|
2528
|
+
/* @__PURE__ */ jsxs14("div", { className: "flex items-center justify-between border-b border-[var(--md3-outline-variant)] px-4 py-3", children: [
|
|
2529
|
+
/* @__PURE__ */ jsx17("p", { className: "font-bold text-foreground text-sm", children: "Notifications" }),
|
|
2530
|
+
(notifData?.unreadCount ?? 0) > 0 && notifData?.onMarkAllRead && /* @__PURE__ */ jsx17(
|
|
2251
2531
|
"button",
|
|
2252
2532
|
{
|
|
2253
2533
|
type: "button",
|
|
@@ -2259,11 +2539,11 @@ function DashboardLayoutInner({
|
|
|
2259
2539
|
}
|
|
2260
2540
|
)
|
|
2261
2541
|
] }),
|
|
2262
|
-
!notifData?.items || notifData.items.length === 0 ? /* @__PURE__ */
|
|
2263
|
-
/* @__PURE__ */
|
|
2264
|
-
/* @__PURE__ */
|
|
2265
|
-
/* @__PURE__ */
|
|
2266
|
-
] }) : /* @__PURE__ */
|
|
2542
|
+
!notifData?.items || notifData.items.length === 0 ? /* @__PURE__ */ jsxs14("div", { className: "flex flex-col items-center justify-center px-4 py-8 text-center", children: [
|
|
2543
|
+
/* @__PURE__ */ jsx17(Bell, { className: "h-8 w-8 text-muted-foreground/40 mb-2" }),
|
|
2544
|
+
/* @__PURE__ */ jsx17("p", { className: "text-muted-foreground text-sm", children: "No notifications yet" }),
|
|
2545
|
+
/* @__PURE__ */ jsx17("p", { className: "text-muted-foreground/60 text-xs mt-1", children: "We'll notify you about important updates" })
|
|
2546
|
+
] }) : /* @__PURE__ */ jsx17("div", { className: "max-h-80 overflow-y-auto", children: notifData.items.map((n) => /* @__PURE__ */ jsxs14(
|
|
2267
2547
|
"button",
|
|
2268
2548
|
{
|
|
2269
2549
|
type: "button",
|
|
@@ -2275,9 +2555,9 @@ function DashboardLayoutInner({
|
|
|
2275
2555
|
if (!n.read) notifData.onMarkRead?.(n.id);
|
|
2276
2556
|
},
|
|
2277
2557
|
children: [
|
|
2278
|
-
/* @__PURE__ */
|
|
2279
|
-
/* @__PURE__ */
|
|
2280
|
-
/* @__PURE__ */
|
|
2558
|
+
/* @__PURE__ */ jsx17("p", { className: cn("text-sm", !n.read ? "font-semibold text-foreground" : "text-muted-foreground"), children: n.title }),
|
|
2559
|
+
/* @__PURE__ */ jsx17("p", { className: "text-xs text-muted-foreground mt-0.5 line-clamp-2", children: n.message }),
|
|
2560
|
+
/* @__PURE__ */ jsx17("p", { className: "text-[10px] text-muted-foreground/50 mt-1", children: formatNotifDate(n.createdAt) })
|
|
2281
2561
|
]
|
|
2282
2562
|
},
|
|
2283
2563
|
n.id
|
|
@@ -2285,7 +2565,7 @@ function DashboardLayoutInner({
|
|
|
2285
2565
|
] })
|
|
2286
2566
|
] })
|
|
2287
2567
|
] }),
|
|
2288
|
-
/* @__PURE__ */
|
|
2568
|
+
/* @__PURE__ */ jsx17(
|
|
2289
2569
|
"button",
|
|
2290
2570
|
{
|
|
2291
2571
|
type: "button",
|
|
@@ -2293,14 +2573,14 @@ function DashboardLayoutInner({
|
|
|
2293
2573
|
className: "rounded-md p-2 hover:bg-surface-container-high lg:hidden",
|
|
2294
2574
|
"aria-label": mobileMenuOpen ? "Close menu" : "Open menu",
|
|
2295
2575
|
"aria-expanded": mobileMenuOpen,
|
|
2296
|
-
children: mobileMenuOpen ? /* @__PURE__ */
|
|
2576
|
+
children: mobileMenuOpen ? /* @__PURE__ */ jsx17(XIcon, { className: "h-6 w-6" }) : /* @__PURE__ */ jsx17(MenuIcon, { className: "h-6 w-6" })
|
|
2297
2577
|
}
|
|
2298
2578
|
)
|
|
2299
2579
|
]
|
|
2300
2580
|
}
|
|
2301
2581
|
),
|
|
2302
|
-
mobileMenuOpen && /* @__PURE__ */
|
|
2303
|
-
/* @__PURE__ */
|
|
2582
|
+
mobileMenuOpen && /* @__PURE__ */ jsx17("div", { className: "fixed inset-0 z-30 bg-black/50 lg:hidden", onClick: () => setMobileMenuOpen(false), "aria-hidden": "true" }),
|
|
2583
|
+
/* @__PURE__ */ jsx17(
|
|
2304
2584
|
"aside",
|
|
2305
2585
|
{
|
|
2306
2586
|
className: cn(
|
|
@@ -2313,18 +2593,18 @@ function DashboardLayoutInner({
|
|
|
2313
2593
|
children: mobileSidebarContent
|
|
2314
2594
|
}
|
|
2315
2595
|
),
|
|
2316
|
-
/* @__PURE__ */
|
|
2317
|
-
/* @__PURE__ */
|
|
2596
|
+
/* @__PURE__ */ jsx17(Sidebar, { className: cn("hidden lg:flex", sidebarClassName), children: sidebarContent }),
|
|
2597
|
+
/* @__PURE__ */ jsx17(SidebarContent, { className: cn("pt-16 px-6 pb-8 lg:px-8 bg-surface", contentClassName), children }),
|
|
2318
2598
|
footer
|
|
2319
2599
|
] });
|
|
2320
2600
|
}
|
|
2321
2601
|
function DashboardLayout({ defaultPanelOpen, defaultMode, labeledRail, defaultRailCollapsed, ...props }) {
|
|
2322
|
-
return /* @__PURE__ */
|
|
2602
|
+
return /* @__PURE__ */ jsx17(SidebarProvider, { defaultPanelOpen, defaultMode, labeledRail, defaultRailCollapsed, hasPanels: (props.panels?.length ?? 0) > 0, children: /* @__PURE__ */ jsx17(DashboardLayoutInner, { defaultPanelOpen, defaultMode, labeledRail, ...props }) });
|
|
2323
2603
|
}
|
|
2324
2604
|
|
|
2325
2605
|
// src/dashboard/sidebar-layout.tsx
|
|
2326
2606
|
import * as React10 from "react";
|
|
2327
|
-
import { Fragment as Fragment10, jsx as
|
|
2607
|
+
import { Fragment as Fragment10, jsx as jsx18, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2328
2608
|
var HIDE_BELOW_CLASS = {
|
|
2329
2609
|
md: "max-md:hidden",
|
|
2330
2610
|
lg: "max-lg:hidden"
|
|
@@ -2334,10 +2614,10 @@ var SHOW_BELOW_CLASS = {
|
|
|
2334
2614
|
lg: "lg:hidden"
|
|
2335
2615
|
};
|
|
2336
2616
|
function MenuIcon2({ className }) {
|
|
2337
|
-
return /* @__PURE__ */
|
|
2617
|
+
return /* @__PURE__ */ jsx18("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx18("path", { d: "M3 6h18M3 12h18M3 18h18" }) });
|
|
2338
2618
|
}
|
|
2339
2619
|
function CloseIcon({ className }) {
|
|
2340
|
-
return /* @__PURE__ */
|
|
2620
|
+
return /* @__PURE__ */ jsx18("svg", { className, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", "aria-hidden": "true", children: /* @__PURE__ */ jsx18("path", { d: "M18 6 6 18M6 6l12 12" }) });
|
|
2341
2621
|
}
|
|
2342
2622
|
function DefaultLink3({
|
|
2343
2623
|
href,
|
|
@@ -2346,7 +2626,7 @@ function DefaultLink3({
|
|
|
2346
2626
|
children,
|
|
2347
2627
|
...rest
|
|
2348
2628
|
}) {
|
|
2349
|
-
return /* @__PURE__ */
|
|
2629
|
+
return /* @__PURE__ */ jsx18("a", { href: href ?? to, className, ...rest, children });
|
|
2350
2630
|
}
|
|
2351
2631
|
function SidebarLayoutInner({
|
|
2352
2632
|
children,
|
|
@@ -2389,7 +2669,7 @@ function SidebarLayoutInner({
|
|
|
2389
2669
|
}) {
|
|
2390
2670
|
return navItems.map((item) => {
|
|
2391
2671
|
if (item.expandable) {
|
|
2392
|
-
return /* @__PURE__ */
|
|
2672
|
+
return /* @__PURE__ */ jsx18(
|
|
2393
2673
|
RailExpandable,
|
|
2394
2674
|
{
|
|
2395
2675
|
icon: item.icon,
|
|
@@ -2410,7 +2690,7 @@ function SidebarLayoutInner({
|
|
|
2410
2690
|
}
|
|
2411
2691
|
if (item.flyoutItems && item.flyoutItems.length > 0) {
|
|
2412
2692
|
const activeSet = new Set(item.flyoutActiveIds ?? []);
|
|
2413
|
-
return /* @__PURE__ */
|
|
2693
|
+
return /* @__PURE__ */ jsx18(
|
|
2414
2694
|
RailFlyout,
|
|
2415
2695
|
{
|
|
2416
2696
|
icon: item.icon,
|
|
@@ -2421,7 +2701,7 @@ function SidebarLayoutInner({
|
|
|
2421
2701
|
children: item.flyoutItems.map((f) => {
|
|
2422
2702
|
const FIcon = f.icon;
|
|
2423
2703
|
const active = activeSet.has(f.id);
|
|
2424
|
-
return /* @__PURE__ */
|
|
2704
|
+
return /* @__PURE__ */ jsxs15(
|
|
2425
2705
|
Link,
|
|
2426
2706
|
{
|
|
2427
2707
|
href: f.href,
|
|
@@ -2433,8 +2713,8 @@ function SidebarLayoutInner({
|
|
|
2433
2713
|
active ? "bg-[var(--accent-surface-strong)] font-medium text-[var(--accent-text)]" : "text-muted-foreground hover:bg-[var(--accent-surface-soft)] hover:text-[var(--accent-text)]"
|
|
2434
2714
|
),
|
|
2435
2715
|
children: [
|
|
2436
|
-
/* @__PURE__ */
|
|
2437
|
-
/* @__PURE__ */
|
|
2716
|
+
/* @__PURE__ */ jsx18(FIcon, { className: "h-4 w-4 shrink-0" }),
|
|
2717
|
+
/* @__PURE__ */ jsx18("span", { className: "truncate", children: f.label })
|
|
2438
2718
|
]
|
|
2439
2719
|
},
|
|
2440
2720
|
f.id
|
|
@@ -2444,7 +2724,7 @@ function SidebarLayoutInner({
|
|
|
2444
2724
|
item.id
|
|
2445
2725
|
);
|
|
2446
2726
|
}
|
|
2447
|
-
return item.togglesPanel ? /* @__PURE__ */
|
|
2727
|
+
return item.togglesPanel ? /* @__PURE__ */ jsx18(
|
|
2448
2728
|
RailButton,
|
|
2449
2729
|
{
|
|
2450
2730
|
icon: item.icon,
|
|
@@ -2458,7 +2738,7 @@ function SidebarLayoutInner({
|
|
|
2458
2738
|
showLabel: showLabels2
|
|
2459
2739
|
},
|
|
2460
2740
|
item.id
|
|
2461
|
-
) : /* @__PURE__ */
|
|
2741
|
+
) : /* @__PURE__ */ jsx18(RailButton, { icon: item.icon, label: item.label, badge: item.badge, isActive: activeId === item.id, showLabel: showLabels2, variant: item.variant, asChild: true, children: /* @__PURE__ */ jsx18(
|
|
2462
2742
|
Link,
|
|
2463
2743
|
{
|
|
2464
2744
|
href: item.href,
|
|
@@ -2469,10 +2749,10 @@ function SidebarLayoutInner({
|
|
|
2469
2749
|
) }, item.id);
|
|
2470
2750
|
});
|
|
2471
2751
|
}
|
|
2472
|
-
return /* @__PURE__ */
|
|
2473
|
-
/* @__PURE__ */
|
|
2474
|
-
/* @__PURE__ */
|
|
2475
|
-
(logo !== void 0 || railHeaderContent !== void 0 || railLabels) && /* @__PURE__ */
|
|
2752
|
+
return /* @__PURE__ */ jsxs15("div", { className: cn("min-h-screen bg-surface text-foreground", className), children: [
|
|
2753
|
+
/* @__PURE__ */ jsx18("div", { className: cn(hideBelow && HIDE_BELOW_CLASS[hideBelow]), children: /* @__PURE__ */ jsxs15(Sidebar, { className: sidebarClassName, children: [
|
|
2754
|
+
/* @__PURE__ */ jsxs15(SidebarRail, { children: [
|
|
2755
|
+
(logo !== void 0 || railHeaderContent !== void 0 || railLabels) && /* @__PURE__ */ jsx18(
|
|
2476
2756
|
RailHeader,
|
|
2477
2757
|
{
|
|
2478
2758
|
brand: logo,
|
|
@@ -2484,10 +2764,10 @@ function SidebarLayoutInner({
|
|
|
2484
2764
|
children: railHeaderContent
|
|
2485
2765
|
}
|
|
2486
2766
|
),
|
|
2487
|
-
/* @__PURE__ */
|
|
2488
|
-
(railFooter !== void 0 || hasProfile) && /* @__PURE__ */
|
|
2767
|
+
/* @__PURE__ */ jsx18(SidebarRailNav, { className: cn(showLabels ? "px-2" : void 0, expandOnEmptyClick && "cursor-pointer"), onClick: expandOnEmptyClick, children: renderNavItems({ showLabels, onNavigate: handleNavClick }) }),
|
|
2768
|
+
(railFooter !== void 0 || hasProfile) && /* @__PURE__ */ jsxs15(SidebarRailFooter, { className: cn("border-t border-[var(--md3-outline-variant)] pt-2", showLabels && "items-stretch px-2"), children: [
|
|
2489
2769
|
railFooter,
|
|
2490
|
-
hasProfile && /* @__PURE__ */
|
|
2770
|
+
hasProfile && /* @__PURE__ */ jsx18(
|
|
2491
2771
|
ProfileAvatar,
|
|
2492
2772
|
{
|
|
2493
2773
|
user: user ?? void 0,
|
|
@@ -2503,10 +2783,10 @@ function SidebarLayoutInner({
|
|
|
2503
2783
|
)
|
|
2504
2784
|
] })
|
|
2505
2785
|
] }),
|
|
2506
|
-
panel != null && /* @__PURE__ */
|
|
2786
|
+
panel != null && /* @__PURE__ */ jsx18(SidebarPanel, { children: panel })
|
|
2507
2787
|
] }) }),
|
|
2508
|
-
/* @__PURE__ */
|
|
2509
|
-
hideBelow && /* @__PURE__ */
|
|
2788
|
+
/* @__PURE__ */ jsxs15(SidebarContent, { className: contentClassName, children: [
|
|
2789
|
+
hideBelow && /* @__PURE__ */ jsxs15(
|
|
2510
2790
|
"header",
|
|
2511
2791
|
{
|
|
2512
2792
|
className: cn(
|
|
@@ -2514,7 +2794,7 @@ function SidebarLayoutInner({
|
|
|
2514
2794
|
SHOW_BELOW_CLASS[hideBelow]
|
|
2515
2795
|
),
|
|
2516
2796
|
children: [
|
|
2517
|
-
/* @__PURE__ */
|
|
2797
|
+
/* @__PURE__ */ jsx18(
|
|
2518
2798
|
"button",
|
|
2519
2799
|
{
|
|
2520
2800
|
type: "button",
|
|
@@ -2524,11 +2804,11 @@ function SidebarLayoutInner({
|
|
|
2524
2804
|
"aria-haspopup": "dialog",
|
|
2525
2805
|
onClick: () => setMobileNavOpen(true),
|
|
2526
2806
|
className: "flex size-10 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-[var(--accent-surface-soft)] hover:text-foreground",
|
|
2527
|
-
children: /* @__PURE__ */
|
|
2807
|
+
children: /* @__PURE__ */ jsx18(MenuIcon2, { className: "size-5" })
|
|
2528
2808
|
}
|
|
2529
2809
|
),
|
|
2530
|
-
/* @__PURE__ */
|
|
2531
|
-
hasProfile && /* @__PURE__ */
|
|
2810
|
+
/* @__PURE__ */ jsx18("div", { className: "flex min-w-0 flex-1 items-center", children: railHeaderContent ?? (logo !== void 0 ? /* @__PURE__ */ jsx18(Link, { href: logoHref, to: logoHref, className: "flex min-w-0 items-center", children: logo }) : null) }),
|
|
2811
|
+
hasProfile && /* @__PURE__ */ jsx18(
|
|
2532
2812
|
ProfileAvatar,
|
|
2533
2813
|
{
|
|
2534
2814
|
user: user ?? void 0,
|
|
@@ -2546,15 +2826,15 @@ function SidebarLayoutInner({
|
|
|
2546
2826
|
),
|
|
2547
2827
|
children
|
|
2548
2828
|
] }),
|
|
2549
|
-
hideBelow && mobileNavOpen && /* @__PURE__ */
|
|
2829
|
+
hideBelow && mobileNavOpen && /* @__PURE__ */ jsx18(
|
|
2550
2830
|
MobileNavDrawer,
|
|
2551
2831
|
{
|
|
2552
2832
|
breakpoint: hideBelow,
|
|
2553
2833
|
onClose: closeMobileNav,
|
|
2554
2834
|
header: railHeaderContent ?? logo,
|
|
2555
|
-
footer: railFooter !== void 0 || hasProfile ? /* @__PURE__ */
|
|
2835
|
+
footer: railFooter !== void 0 || hasProfile ? /* @__PURE__ */ jsxs15(Fragment10, { children: [
|
|
2556
2836
|
railFooter,
|
|
2557
|
-
hasProfile && /* @__PURE__ */
|
|
2837
|
+
hasProfile && /* @__PURE__ */ jsx18(
|
|
2558
2838
|
ProfileAvatar,
|
|
2559
2839
|
{
|
|
2560
2840
|
user: user ?? void 0,
|
|
@@ -2627,8 +2907,8 @@ function MobileNavDrawer({
|
|
|
2627
2907
|
React10.useEffect(() => {
|
|
2628
2908
|
panelRef.current?.querySelector("button,a[href]")?.focus();
|
|
2629
2909
|
}, []);
|
|
2630
|
-
return /* @__PURE__ */
|
|
2631
|
-
/* @__PURE__ */
|
|
2910
|
+
return /* @__PURE__ */ jsxs15("div", { className: cn("fixed inset-0 z-50", SHOW_BELOW_CLASS[breakpoint]), children: [
|
|
2911
|
+
/* @__PURE__ */ jsx18(
|
|
2632
2912
|
"button",
|
|
2633
2913
|
{
|
|
2634
2914
|
type: "button",
|
|
@@ -2638,7 +2918,7 @@ function MobileNavDrawer({
|
|
|
2638
2918
|
className: "absolute inset-0 bg-black/50"
|
|
2639
2919
|
}
|
|
2640
2920
|
),
|
|
2641
|
-
/* @__PURE__ */
|
|
2921
|
+
/* @__PURE__ */ jsxs15(
|
|
2642
2922
|
"div",
|
|
2643
2923
|
{
|
|
2644
2924
|
ref: panelRef,
|
|
@@ -2649,24 +2929,24 @@ function MobileNavDrawer({
|
|
|
2649
2929
|
style: { width: SIDEBAR_MOBILE_WIDTH },
|
|
2650
2930
|
className: "absolute inset-y-0 left-0 flex max-w-[85vw] flex-col border-r border-[var(--md3-outline-variant)] bg-surface-container-low shadow-xl",
|
|
2651
2931
|
children: [
|
|
2652
|
-
/* @__PURE__ */
|
|
2653
|
-
/* @__PURE__ */
|
|
2654
|
-
/* @__PURE__ */
|
|
2932
|
+
/* @__PURE__ */ jsxs15("div", { className: "flex h-14 shrink-0 items-center gap-1 border-b border-[var(--md3-outline-variant)] px-2", children: [
|
|
2933
|
+
/* @__PURE__ */ jsx18("div", { className: "flex min-w-0 flex-1 items-center", children: header }),
|
|
2934
|
+
/* @__PURE__ */ jsx18(
|
|
2655
2935
|
"button",
|
|
2656
2936
|
{
|
|
2657
2937
|
type: "button",
|
|
2658
2938
|
"aria-label": "Close navigation",
|
|
2659
2939
|
onClick: onClose,
|
|
2660
2940
|
className: "flex size-9 shrink-0 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-[var(--accent-surface-soft)] hover:text-foreground",
|
|
2661
|
-
children: /* @__PURE__ */
|
|
2941
|
+
children: /* @__PURE__ */ jsx18(CloseIcon, { className: "size-5" })
|
|
2662
2942
|
}
|
|
2663
2943
|
)
|
|
2664
2944
|
] }),
|
|
2665
|
-
/* @__PURE__ */
|
|
2945
|
+
/* @__PURE__ */ jsxs15("nav", { "aria-label": "Sections", className: "flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto px-2 py-2", children: [
|
|
2666
2946
|
children,
|
|
2667
|
-
panel != null && /* @__PURE__ */
|
|
2947
|
+
panel != null && /* @__PURE__ */ jsx18("div", { className: "mt-2 border-t border-[var(--md3-outline-variant)] pt-2", children: panel })
|
|
2668
2948
|
] }),
|
|
2669
|
-
footer != null && /* @__PURE__ */
|
|
2949
|
+
footer != null && /* @__PURE__ */ jsx18("div", { className: "shrink-0 border-t border-[var(--md3-outline-variant)] px-2 py-2", children: footer })
|
|
2670
2950
|
]
|
|
2671
2951
|
}
|
|
2672
2952
|
)
|
|
@@ -2681,7 +2961,7 @@ function SidebarLayout({
|
|
|
2681
2961
|
defaultRailCollapsed,
|
|
2682
2962
|
...props
|
|
2683
2963
|
}) {
|
|
2684
|
-
return /* @__PURE__ */
|
|
2964
|
+
return /* @__PURE__ */ jsx18(
|
|
2685
2965
|
SidebarProvider,
|
|
2686
2966
|
{
|
|
2687
2967
|
panelOpen,
|
|
@@ -2692,13 +2972,13 @@ function SidebarLayout({
|
|
|
2692
2972
|
defaultRailCollapsed,
|
|
2693
2973
|
hasPanels: props.panel != null,
|
|
2694
2974
|
labeledRail: props.railLabels ?? false,
|
|
2695
|
-
children: /* @__PURE__ */
|
|
2975
|
+
children: /* @__PURE__ */ jsx18(SidebarLayoutInner, { ...props })
|
|
2696
2976
|
}
|
|
2697
2977
|
);
|
|
2698
2978
|
}
|
|
2699
2979
|
|
|
2700
2980
|
// src/dashboard/profile-selector.tsx
|
|
2701
|
-
import { Check as Check3, ChevronDown, Plus as Plus3, Settings } from "lucide-react";
|
|
2981
|
+
import { Check as Check3, ChevronDown as ChevronDown2, Plus as Plus3, Settings } from "lucide-react";
|
|
2702
2982
|
import { Button as Button2 } from "@tangle-network/ui/primitives";
|
|
2703
2983
|
import { Badge } from "@tangle-network/ui/primitives";
|
|
2704
2984
|
import {
|
|
@@ -2709,7 +2989,7 @@ import {
|
|
|
2709
2989
|
DropdownMenuSeparator as DropdownMenuSeparator4,
|
|
2710
2990
|
DropdownMenuTrigger as DropdownMenuTrigger4
|
|
2711
2991
|
} from "@tangle-network/ui/primitives";
|
|
2712
|
-
import { Fragment as Fragment11, jsx as
|
|
2992
|
+
import { Fragment as Fragment11, jsx as jsx19, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2713
2993
|
function ProfileSelector({
|
|
2714
2994
|
profiles,
|
|
2715
2995
|
selectedId,
|
|
@@ -2724,77 +3004,77 @@ function ProfileSelector({
|
|
|
2724
3004
|
const selected = profiles.find((p) => p.id === selectedId);
|
|
2725
3005
|
const builtinProfiles = profiles.filter((p) => p.is_builtin);
|
|
2726
3006
|
const customProfiles = profiles.filter((p) => !p.is_builtin);
|
|
2727
|
-
return /* @__PURE__ */
|
|
2728
|
-
label && /* @__PURE__ */
|
|
2729
|
-
/* @__PURE__ */
|
|
2730
|
-
/* @__PURE__ */
|
|
2731
|
-
/* @__PURE__ */
|
|
2732
|
-
/* @__PURE__ */
|
|
3007
|
+
return /* @__PURE__ */ jsxs16("div", { className, children: [
|
|
3008
|
+
label && /* @__PURE__ */ jsx19("label", { className: "mb-2 block font-medium text-sm", children: label }),
|
|
3009
|
+
/* @__PURE__ */ jsxs16(DropdownMenu4, { children: [
|
|
3010
|
+
/* @__PURE__ */ jsx19(DropdownMenuTrigger4, { asChild: true, children: /* @__PURE__ */ jsxs16(Button2, { variant: "outline", className: "w-full justify-between", children: [
|
|
3011
|
+
/* @__PURE__ */ jsx19("span", { className: "truncate", children: selected ? selected.name : placeholder }),
|
|
3012
|
+
/* @__PURE__ */ jsx19(ChevronDown2, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
2733
3013
|
] }) }),
|
|
2734
|
-
/* @__PURE__ */
|
|
2735
|
-
/* @__PURE__ */
|
|
3014
|
+
/* @__PURE__ */ jsxs16(DropdownMenuContent4, { className: "w-[300px]", align: "start", children: [
|
|
3015
|
+
/* @__PURE__ */ jsxs16(
|
|
2736
3016
|
DropdownMenuItem4,
|
|
2737
3017
|
{
|
|
2738
3018
|
onClick: () => onSelect(null),
|
|
2739
3019
|
className: "flex items-center justify-between",
|
|
2740
3020
|
children: [
|
|
2741
|
-
/* @__PURE__ */
|
|
2742
|
-
!selectedId && /* @__PURE__ */
|
|
3021
|
+
/* @__PURE__ */ jsx19("span", { children: placeholder }),
|
|
3022
|
+
!selectedId && /* @__PURE__ */ jsx19(Check3, { className: "h-4 w-4 text-[var(--surface-success-text)]" })
|
|
2743
3023
|
]
|
|
2744
3024
|
}
|
|
2745
3025
|
),
|
|
2746
|
-
builtinProfiles.length > 0 && /* @__PURE__ */
|
|
2747
|
-
/* @__PURE__ */
|
|
2748
|
-
/* @__PURE__ */
|
|
2749
|
-
builtinProfiles.map((profile) => /* @__PURE__ */
|
|
3026
|
+
builtinProfiles.length > 0 && /* @__PURE__ */ jsxs16(Fragment11, { children: [
|
|
3027
|
+
/* @__PURE__ */ jsx19(DropdownMenuSeparator4, {}),
|
|
3028
|
+
/* @__PURE__ */ jsx19(DropdownMenuLabel2, { children: "Built-in Profiles" }),
|
|
3029
|
+
builtinProfiles.map((profile) => /* @__PURE__ */ jsxs16(
|
|
2750
3030
|
DropdownMenuItem4,
|
|
2751
3031
|
{
|
|
2752
3032
|
onClick: () => onSelect(profile),
|
|
2753
3033
|
className: "flex flex-col items-start gap-1",
|
|
2754
3034
|
children: [
|
|
2755
|
-
/* @__PURE__ */
|
|
2756
|
-
/* @__PURE__ */
|
|
2757
|
-
/* @__PURE__ */
|
|
2758
|
-
profile.extends && /* @__PURE__ */
|
|
3035
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex w-full items-center justify-between", children: [
|
|
3036
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
|
|
3037
|
+
/* @__PURE__ */ jsx19("span", { className: "font-medium", children: profile.name }),
|
|
3038
|
+
profile.extends && /* @__PURE__ */ jsxs16(Badge, { variant: "secondary", className: "border-0 text-xs", children: [
|
|
2759
3039
|
"extends ",
|
|
2760
3040
|
profile.extends
|
|
2761
3041
|
] })
|
|
2762
3042
|
] }),
|
|
2763
|
-
selectedId === profile.id && /* @__PURE__ */
|
|
3043
|
+
selectedId === profile.id && /* @__PURE__ */ jsx19(Check3, { className: "h-4 w-4 text-[var(--surface-success-text)]" })
|
|
2764
3044
|
] }),
|
|
2765
|
-
profile.description && /* @__PURE__ */
|
|
3045
|
+
profile.description && /* @__PURE__ */ jsx19("span", { className: "line-clamp-1 text-muted-foreground text-xs", children: profile.description })
|
|
2766
3046
|
]
|
|
2767
3047
|
},
|
|
2768
3048
|
profile.id
|
|
2769
3049
|
))
|
|
2770
3050
|
] }),
|
|
2771
|
-
customProfiles.length > 0 && /* @__PURE__ */
|
|
2772
|
-
/* @__PURE__ */
|
|
2773
|
-
/* @__PURE__ */
|
|
2774
|
-
customProfiles.map((profile) => /* @__PURE__ */
|
|
3051
|
+
customProfiles.length > 0 && /* @__PURE__ */ jsxs16(Fragment11, { children: [
|
|
3052
|
+
/* @__PURE__ */ jsx19(DropdownMenuSeparator4, {}),
|
|
3053
|
+
/* @__PURE__ */ jsx19(DropdownMenuLabel2, { children: "Custom Profiles" }),
|
|
3054
|
+
customProfiles.map((profile) => /* @__PURE__ */ jsxs16(
|
|
2775
3055
|
DropdownMenuItem4,
|
|
2776
3056
|
{
|
|
2777
3057
|
onClick: () => onSelect(profile),
|
|
2778
3058
|
className: "flex flex-col items-start gap-1",
|
|
2779
3059
|
children: [
|
|
2780
|
-
/* @__PURE__ */
|
|
2781
|
-
/* @__PURE__ */
|
|
2782
|
-
/* @__PURE__ */
|
|
2783
|
-
profile.model && /* @__PURE__ */
|
|
3060
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex w-full items-center justify-between", children: [
|
|
3061
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
|
|
3062
|
+
/* @__PURE__ */ jsx19("span", { className: "font-medium", children: profile.name }),
|
|
3063
|
+
profile.model && /* @__PURE__ */ jsx19(Badge, { variant: "secondary", className: "border-0 text-xs", children: profile.model.split("/").pop() })
|
|
2784
3064
|
] }),
|
|
2785
|
-
selectedId === profile.id && /* @__PURE__ */
|
|
3065
|
+
selectedId === profile.id && /* @__PURE__ */ jsx19(Check3, { className: "h-4 w-4 text-[var(--surface-success-text)]" })
|
|
2786
3066
|
] }),
|
|
2787
|
-
profile.description && /* @__PURE__ */
|
|
2788
|
-
showMetrics && profile.metrics && profile.metrics.total_runs > 0 && /* @__PURE__ */
|
|
2789
|
-
/* @__PURE__ */
|
|
3067
|
+
profile.description && /* @__PURE__ */ jsx19("span", { className: "line-clamp-1 text-muted-foreground text-xs", children: profile.description }),
|
|
3068
|
+
showMetrics && profile.metrics && profile.metrics.total_runs > 0 && /* @__PURE__ */ jsxs16("div", { className: "flex gap-3 text-muted-foreground text-xs", children: [
|
|
3069
|
+
/* @__PURE__ */ jsxs16("span", { children: [
|
|
2790
3070
|
profile.metrics.total_runs,
|
|
2791
3071
|
" runs"
|
|
2792
3072
|
] }),
|
|
2793
|
-
/* @__PURE__ */
|
|
3073
|
+
/* @__PURE__ */ jsxs16("span", { children: [
|
|
2794
3074
|
profile.metrics.success_rate.toFixed(0),
|
|
2795
3075
|
"% success"
|
|
2796
3076
|
] }),
|
|
2797
|
-
/* @__PURE__ */
|
|
3077
|
+
/* @__PURE__ */ jsxs16("span", { children: [
|
|
2798
3078
|
"~",
|
|
2799
3079
|
(profile.metrics.avg_duration_ms / 1e3).toFixed(1),
|
|
2800
3080
|
"s avg"
|
|
@@ -2805,26 +3085,26 @@ function ProfileSelector({
|
|
|
2805
3085
|
profile.id
|
|
2806
3086
|
))
|
|
2807
3087
|
] }),
|
|
2808
|
-
(onCreateClick || onManageClick) && /* @__PURE__ */
|
|
2809
|
-
/* @__PURE__ */
|
|
2810
|
-
onCreateClick && /* @__PURE__ */
|
|
3088
|
+
(onCreateClick || onManageClick) && /* @__PURE__ */ jsxs16(Fragment11, { children: [
|
|
3089
|
+
/* @__PURE__ */ jsx19(DropdownMenuSeparator4, {}),
|
|
3090
|
+
onCreateClick && /* @__PURE__ */ jsxs16(
|
|
2811
3091
|
DropdownMenuItem4,
|
|
2812
3092
|
{
|
|
2813
3093
|
onClick: onCreateClick,
|
|
2814
3094
|
className: "text-[var(--surface-info-text)]",
|
|
2815
3095
|
children: [
|
|
2816
|
-
/* @__PURE__ */
|
|
3096
|
+
/* @__PURE__ */ jsx19(Plus3, { className: "mr-2 h-4 w-4" }),
|
|
2817
3097
|
"Create New Profile"
|
|
2818
3098
|
]
|
|
2819
3099
|
}
|
|
2820
3100
|
),
|
|
2821
|
-
onManageClick && /* @__PURE__ */
|
|
3101
|
+
onManageClick && /* @__PURE__ */ jsxs16(
|
|
2822
3102
|
DropdownMenuItem4,
|
|
2823
3103
|
{
|
|
2824
3104
|
onClick: onManageClick,
|
|
2825
3105
|
className: "text-muted-foreground",
|
|
2826
3106
|
children: [
|
|
2827
|
-
/* @__PURE__ */
|
|
3107
|
+
/* @__PURE__ */ jsx19(Settings, { className: "mr-2 h-4 w-4" }),
|
|
2828
3108
|
"Manage Profiles"
|
|
2829
3109
|
]
|
|
2830
3110
|
}
|
|
@@ -2850,26 +3130,26 @@ function ProfileComparison({
|
|
|
2850
3130
|
const fastestProfile = profilesWithMetrics.reduce(
|
|
2851
3131
|
(best, p) => (p.metrics?.avg_duration_ms ?? Number.POSITIVE_INFINITY) < (best.metrics?.avg_duration_ms ?? Number.POSITIVE_INFINITY) ? p : best
|
|
2852
3132
|
);
|
|
2853
|
-
return /* @__PURE__ */
|
|
2854
|
-
/* @__PURE__ */
|
|
2855
|
-
/* @__PURE__ */
|
|
3133
|
+
return /* @__PURE__ */ jsxs16("div", { className: `rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container p-4 ${className ?? ""}`, children: [
|
|
3134
|
+
/* @__PURE__ */ jsx19("h4", { className: "mb-3 font-medium text-sm", children: "Profile Performance" }),
|
|
3135
|
+
/* @__PURE__ */ jsx19("div", { className: "space-y-3", children: profilesWithMetrics.map((profile) => {
|
|
2856
3136
|
const isBestSuccess = profile.id === bestSuccess.id;
|
|
2857
3137
|
const isFastest = profile.id === fastestProfile.id;
|
|
2858
|
-
return /* @__PURE__ */
|
|
3138
|
+
return /* @__PURE__ */ jsxs16(
|
|
2859
3139
|
"div",
|
|
2860
3140
|
{
|
|
2861
3141
|
className: "flex items-center justify-between gap-4",
|
|
2862
3142
|
children: [
|
|
2863
|
-
/* @__PURE__ */
|
|
2864
|
-
/* @__PURE__ */
|
|
2865
|
-
isBestSuccess && /* @__PURE__ */
|
|
2866
|
-
isFastest && !isBestSuccess && /* @__PURE__ */
|
|
3143
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-2", children: [
|
|
3144
|
+
/* @__PURE__ */ jsx19("span", { className: "font-medium", children: profile.name }),
|
|
3145
|
+
isBestSuccess && /* @__PURE__ */ jsx19(Badge, { className: "border border-[var(--surface-success-border)] bg-[var(--surface-success-bg)] text-[var(--surface-success-text)] text-xs", children: "Best Success" }),
|
|
3146
|
+
isFastest && !isBestSuccess && /* @__PURE__ */ jsx19(Badge, { className: "border border-[var(--surface-info-border)] bg-[var(--surface-info-bg)] text-[var(--surface-info-text)] text-xs", children: "Fastest" })
|
|
2867
3147
|
] }),
|
|
2868
|
-
/* @__PURE__ */
|
|
2869
|
-
/* @__PURE__ */
|
|
2870
|
-
/* @__PURE__ */
|
|
3148
|
+
/* @__PURE__ */ jsxs16("div", { className: "flex items-center gap-4 text-sm", children: [
|
|
3149
|
+
/* @__PURE__ */ jsxs16("span", { children: [
|
|
3150
|
+
/* @__PURE__ */ jsx19("span", { className: "text-muted-foreground", children: "Success:" }),
|
|
2871
3151
|
" ",
|
|
2872
|
-
/* @__PURE__ */
|
|
3152
|
+
/* @__PURE__ */ jsxs16(
|
|
2873
3153
|
"span",
|
|
2874
3154
|
{
|
|
2875
3155
|
className: (profile.metrics?.success_rate ?? 0) >= 80 ? "text-[var(--surface-success-text)]" : (profile.metrics?.success_rate ?? 0) >= 50 ? "text-[var(--surface-warning-text)]" : "text-[var(--surface-danger-text)]",
|
|
@@ -2880,13 +3160,13 @@ function ProfileComparison({
|
|
|
2880
3160
|
}
|
|
2881
3161
|
)
|
|
2882
3162
|
] }),
|
|
2883
|
-
/* @__PURE__ */
|
|
2884
|
-
/* @__PURE__ */
|
|
3163
|
+
/* @__PURE__ */ jsxs16("span", { children: [
|
|
3164
|
+
/* @__PURE__ */ jsx19("span", { className: "text-muted-foreground", children: "Avg:" }),
|
|
2885
3165
|
" ",
|
|
2886
3166
|
((profile.metrics?.avg_duration_ms ?? 0) / 1e3).toFixed(1),
|
|
2887
3167
|
"s"
|
|
2888
3168
|
] }),
|
|
2889
|
-
/* @__PURE__ */
|
|
3169
|
+
/* @__PURE__ */ jsxs16("span", { className: "text-muted-foreground", children: [
|
|
2890
3170
|
profile.metrics?.total_runs,
|
|
2891
3171
|
" runs"
|
|
2892
3172
|
] })
|
|
@@ -2901,7 +3181,7 @@ function ProfileComparison({
|
|
|
2901
3181
|
|
|
2902
3182
|
// src/dashboard/metric-area-chart.tsx
|
|
2903
3183
|
import * as React11 from "react";
|
|
2904
|
-
import { jsx as
|
|
3184
|
+
import { jsx as jsx20, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2905
3185
|
var TONE_VARS = {
|
|
2906
3186
|
primary: "var(--brand-primary, hsl(var(--primary)))",
|
|
2907
3187
|
success: "var(--status-running, #22c55e)",
|
|
@@ -2955,7 +3235,7 @@ function MetricAreaChart({
|
|
|
2955
3235
|
const yMax = maxValue ?? (observedMax > 0 ? observedMax * 1.1 : 1);
|
|
2956
3236
|
const segments = buildSegments(points, width, height, yMax);
|
|
2957
3237
|
const color = TONE_VARS[tone];
|
|
2958
|
-
return /* @__PURE__ */
|
|
3238
|
+
return /* @__PURE__ */ jsxs17(
|
|
2959
3239
|
"div",
|
|
2960
3240
|
{
|
|
2961
3241
|
className: cn(
|
|
@@ -2964,21 +3244,21 @@ function MetricAreaChart({
|
|
|
2964
3244
|
),
|
|
2965
3245
|
"data-testid": `metric-chart-${label.toLowerCase().replace(/\s+/g, "-")}`,
|
|
2966
3246
|
children: [
|
|
2967
|
-
/* @__PURE__ */
|
|
2968
|
-
/* @__PURE__ */
|
|
2969
|
-
/* @__PURE__ */
|
|
2970
|
-
/* @__PURE__ */
|
|
2971
|
-
detail && /* @__PURE__ */
|
|
3247
|
+
/* @__PURE__ */ jsxs17("div", { className: "flex items-baseline justify-between gap-3", children: [
|
|
3248
|
+
/* @__PURE__ */ jsx20("p", { className: "font-medium text-muted-foreground text-xs uppercase tracking-[0.12em]", children: label }),
|
|
3249
|
+
/* @__PURE__ */ jsxs17("div", { className: "text-right", children: [
|
|
3250
|
+
/* @__PURE__ */ jsx20("span", { className: "font-semibold text-foreground text-xl tabular-nums tracking-tight", children: latest === null ? "\u2014" : formatValue(latest) }),
|
|
3251
|
+
detail && /* @__PURE__ */ jsx20("span", { className: "ml-1.5 text-muted-foreground text-xs", children: detail })
|
|
2972
3252
|
] })
|
|
2973
3253
|
] }),
|
|
2974
|
-
/* @__PURE__ */
|
|
3254
|
+
/* @__PURE__ */ jsx20("div", { className: "mt-3", children: values.length === 0 ? /* @__PURE__ */ jsx20(
|
|
2975
3255
|
"div",
|
|
2976
3256
|
{
|
|
2977
3257
|
className: "flex items-center justify-center text-muted-foreground text-xs",
|
|
2978
3258
|
style: { height },
|
|
2979
3259
|
children: emptyState ?? "Waiting for samples\u2026"
|
|
2980
3260
|
}
|
|
2981
|
-
) : /* @__PURE__ */
|
|
3261
|
+
) : /* @__PURE__ */ jsxs17(
|
|
2982
3262
|
"svg",
|
|
2983
3263
|
{
|
|
2984
3264
|
viewBox: `0 0 ${width} ${height}`,
|
|
@@ -2988,7 +3268,7 @@ function MetricAreaChart({
|
|
|
2988
3268
|
role: "img",
|
|
2989
3269
|
"aria-label": `${label} chart`,
|
|
2990
3270
|
children: [
|
|
2991
|
-
[0.25, 0.5, 0.75].map((fraction) => /* @__PURE__ */
|
|
3271
|
+
[0.25, 0.5, 0.75].map((fraction) => /* @__PURE__ */ jsx20(
|
|
2992
3272
|
"line",
|
|
2993
3273
|
{
|
|
2994
3274
|
x1: 0,
|
|
@@ -3003,13 +3283,13 @@ function MetricAreaChart({
|
|
|
3003
3283
|
},
|
|
3004
3284
|
fraction
|
|
3005
3285
|
)),
|
|
3006
|
-
/* @__PURE__ */
|
|
3007
|
-
/* @__PURE__ */
|
|
3008
|
-
/* @__PURE__ */
|
|
3286
|
+
/* @__PURE__ */ jsx20("defs", { children: /* @__PURE__ */ jsxs17("linearGradient", { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [
|
|
3287
|
+
/* @__PURE__ */ jsx20("stop", { offset: "0%", stopColor: color, stopOpacity: 0.28 }),
|
|
3288
|
+
/* @__PURE__ */ jsx20("stop", { offset: "100%", stopColor: color, stopOpacity: 0.02 })
|
|
3009
3289
|
] }) }),
|
|
3010
|
-
segments.map((segment) => /* @__PURE__ */
|
|
3011
|
-
/* @__PURE__ */
|
|
3012
|
-
/* @__PURE__ */
|
|
3290
|
+
segments.map((segment) => /* @__PURE__ */ jsxs17(React11.Fragment, { children: [
|
|
3291
|
+
/* @__PURE__ */ jsx20("path", { d: segment.area, fill: `url(#${gradientId})` }),
|
|
3292
|
+
/* @__PURE__ */ jsx20(
|
|
3013
3293
|
"path",
|
|
3014
3294
|
{
|
|
3015
3295
|
d: segment.path,
|
|
@@ -3025,9 +3305,9 @@ function MetricAreaChart({
|
|
|
3025
3305
|
]
|
|
3026
3306
|
}
|
|
3027
3307
|
) }),
|
|
3028
|
-
/* @__PURE__ */
|
|
3029
|
-
/* @__PURE__ */
|
|
3030
|
-
/* @__PURE__ */
|
|
3308
|
+
/* @__PURE__ */ jsxs17("div", { className: "mt-1.5 flex justify-between text-[10px] text-muted-foreground tabular-nums", children: [
|
|
3309
|
+
/* @__PURE__ */ jsx20("span", { children: values.length > 0 ? formatValue(0) : "" }),
|
|
3310
|
+
/* @__PURE__ */ jsx20("span", { children: values.length > 0 ? formatValue(yMax) : "" })
|
|
3031
3311
|
] })
|
|
3032
3312
|
]
|
|
3033
3313
|
}
|
|
@@ -3047,7 +3327,7 @@ import {
|
|
|
3047
3327
|
} from "lucide-react";
|
|
3048
3328
|
import { Button as Button3 } from "@tangle-network/ui/primitives";
|
|
3049
3329
|
import { Badge as Badge2 } from "@tangle-network/ui/primitives";
|
|
3050
|
-
import { Fragment as Fragment13, jsx as
|
|
3330
|
+
import { Fragment as Fragment13, jsx as jsx21, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3051
3331
|
var statusConfig = {
|
|
3052
3332
|
pending: {
|
|
3053
3333
|
icon: Clock3,
|
|
@@ -3131,19 +3411,19 @@ function VariantList({
|
|
|
3131
3411
|
isActioning,
|
|
3132
3412
|
className
|
|
3133
3413
|
}) {
|
|
3134
|
-
return /* @__PURE__ */
|
|
3414
|
+
return /* @__PURE__ */ jsx21("div", { className: `space-y-2 ${className || ""}`, children: variants.map((variant) => {
|
|
3135
3415
|
const status = statusConfig[variant.status];
|
|
3136
3416
|
const StatusIcon = status.icon;
|
|
3137
3417
|
const isSelected = variant.id === selectedId;
|
|
3138
|
-
return /* @__PURE__ */
|
|
3418
|
+
return /* @__PURE__ */ jsxs18(
|
|
3139
3419
|
"div",
|
|
3140
3420
|
{
|
|
3141
3421
|
className: `cursor-pointer rounded-lg border px-3 py-2.5 transition-colors ${isSelected ? "border-primary/30 bg-[var(--accent-surface-soft)]" : "border-[var(--md3-outline-variant)] bg-surface-container hover:border-primary/20 hover:bg-surface-container-high"}`,
|
|
3142
3422
|
onClick: () => onSelect?.(variant.id),
|
|
3143
3423
|
children: [
|
|
3144
|
-
/* @__PURE__ */
|
|
3145
|
-
/* @__PURE__ */
|
|
3146
|
-
/* @__PURE__ */
|
|
3424
|
+
/* @__PURE__ */ jsxs18("div", { className: "flex items-center gap-2", children: [
|
|
3425
|
+
/* @__PURE__ */ jsxs18(Badge2, { className: `shrink-0 ${status.bg} ${status.border} ${status.color}`, children: [
|
|
3426
|
+
/* @__PURE__ */ jsx21(
|
|
3147
3427
|
StatusIcon,
|
|
3148
3428
|
{
|
|
3149
3429
|
className: `mr-1 h-3 w-3 ${status.animate ? "animate-spin" : ""}`
|
|
@@ -3151,27 +3431,27 @@ function VariantList({
|
|
|
3151
3431
|
),
|
|
3152
3432
|
status.label
|
|
3153
3433
|
] }),
|
|
3154
|
-
/* @__PURE__ */
|
|
3155
|
-
variant.sublabel && /* @__PURE__ */
|
|
3434
|
+
/* @__PURE__ */ jsx21("span", { className: "truncate text-sm font-medium text-foreground", children: variant.label }),
|
|
3435
|
+
variant.sublabel && /* @__PURE__ */ jsxs18("span", { className: "shrink-0 text-xs text-muted-foreground", children: [
|
|
3156
3436
|
"(",
|
|
3157
3437
|
variant.sublabel,
|
|
3158
3438
|
")"
|
|
3159
3439
|
] }),
|
|
3160
|
-
variant.durationMs && /* @__PURE__ */
|
|
3161
|
-
/* @__PURE__ */
|
|
3440
|
+
variant.durationMs && /* @__PURE__ */ jsxs18("span", { className: "flex shrink-0 items-center gap-1 text-xs text-muted-foreground", children: [
|
|
3441
|
+
/* @__PURE__ */ jsx21(Timer, { className: "h-3 w-3" }),
|
|
3162
3442
|
(variant.durationMs / 1e3).toFixed(1),
|
|
3163
3443
|
"s"
|
|
3164
3444
|
] }),
|
|
3165
|
-
/* @__PURE__ */
|
|
3166
|
-
variant.outcome && /* @__PURE__ */
|
|
3445
|
+
/* @__PURE__ */ jsxs18("div", { className: "ml-auto flex shrink-0 items-center gap-1.5", children: [
|
|
3446
|
+
variant.outcome && /* @__PURE__ */ jsx21(
|
|
3167
3447
|
Badge2,
|
|
3168
3448
|
{
|
|
3169
3449
|
className: `${outcomeConfig[variant.outcome].bg} ${outcomeConfig[variant.outcome].border} ${outcomeConfig[variant.outcome].color}`,
|
|
3170
3450
|
children: outcomeConfig[variant.outcome].label
|
|
3171
3451
|
}
|
|
3172
3452
|
),
|
|
3173
|
-
variant.status === "completed" && variant.outcome === "pending_review" && onAccept && onReject && /* @__PURE__ */
|
|
3174
|
-
/* @__PURE__ */
|
|
3453
|
+
variant.status === "completed" && variant.outcome === "pending_review" && onAccept && onReject && /* @__PURE__ */ jsxs18(Fragment13, { children: [
|
|
3454
|
+
/* @__PURE__ */ jsxs18(
|
|
3175
3455
|
Button3,
|
|
3176
3456
|
{
|
|
3177
3457
|
variant: "outline",
|
|
@@ -3183,12 +3463,12 @@ function VariantList({
|
|
|
3183
3463
|
},
|
|
3184
3464
|
disabled: isActioning === variant.id,
|
|
3185
3465
|
children: [
|
|
3186
|
-
/* @__PURE__ */
|
|
3466
|
+
/* @__PURE__ */ jsx21(Check4, { className: "mr-1 h-3 w-3" }),
|
|
3187
3467
|
"Accept"
|
|
3188
3468
|
]
|
|
3189
3469
|
}
|
|
3190
3470
|
),
|
|
3191
|
-
/* @__PURE__ */
|
|
3471
|
+
/* @__PURE__ */ jsxs18(
|
|
3192
3472
|
Button3,
|
|
3193
3473
|
{
|
|
3194
3474
|
variant: "outline",
|
|
@@ -3200,13 +3480,13 @@ function VariantList({
|
|
|
3200
3480
|
},
|
|
3201
3481
|
disabled: isActioning === variant.id,
|
|
3202
3482
|
children: [
|
|
3203
|
-
/* @__PURE__ */
|
|
3483
|
+
/* @__PURE__ */ jsx21(X, { className: "mr-1 h-3 w-3" }),
|
|
3204
3484
|
"Reject"
|
|
3205
3485
|
]
|
|
3206
3486
|
}
|
|
3207
3487
|
)
|
|
3208
3488
|
] }),
|
|
3209
|
-
variant.detailsUrl && /* @__PURE__ */
|
|
3489
|
+
variant.detailsUrl && /* @__PURE__ */ jsx21(
|
|
3210
3490
|
Button3,
|
|
3211
3491
|
{
|
|
3212
3492
|
variant: "ghost",
|
|
@@ -3216,13 +3496,13 @@ function VariantList({
|
|
|
3216
3496
|
e.stopPropagation();
|
|
3217
3497
|
window.open(variant.detailsUrl, "_blank");
|
|
3218
3498
|
},
|
|
3219
|
-
children: /* @__PURE__ */
|
|
3499
|
+
children: /* @__PURE__ */ jsx21(ExternalLink2, { className: "h-3.5 w-3.5" })
|
|
3220
3500
|
}
|
|
3221
3501
|
)
|
|
3222
3502
|
] })
|
|
3223
3503
|
] }),
|
|
3224
|
-
variant.error && /* @__PURE__ */
|
|
3225
|
-
variant.summary && /* @__PURE__ */
|
|
3504
|
+
variant.error && /* @__PURE__ */ jsx21("p", { className: "mt-1.5 text-xs text-[var(--surface-danger-text)]", children: variant.error }),
|
|
3505
|
+
variant.summary && /* @__PURE__ */ jsx21("p", { className: "mt-1.5 line-clamp-2 text-xs text-muted-foreground", children: variant.summary })
|
|
3226
3506
|
]
|
|
3227
3507
|
},
|
|
3228
3508
|
variant.id
|
|
@@ -3231,9 +3511,9 @@ function VariantList({
|
|
|
3231
3511
|
}
|
|
3232
3512
|
|
|
3233
3513
|
// src/dashboard/system-logs.tsx
|
|
3234
|
-
import { Terminal as
|
|
3514
|
+
import { Terminal as Terminal3 } from "lucide-react";
|
|
3235
3515
|
import { useEffect as useEffect6, useRef as useRef5, useState as useState7 } from "react";
|
|
3236
|
-
import { jsx as
|
|
3516
|
+
import { jsx as jsx22, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
3237
3517
|
function SystemLogsViewer({ apiUrl, token, className }) {
|
|
3238
3518
|
const [logs, setLogs] = useState7([]);
|
|
3239
3519
|
const [error, setError] = useState7(null);
|
|
@@ -3286,18 +3566,18 @@ function SystemLogsViewer({ apiUrl, token, className }) {
|
|
|
3286
3566
|
const isAtBottom = scrollHeight - scrollTop - clientHeight < 20;
|
|
3287
3567
|
setIsFollowing((prev) => prev === isAtBottom ? prev : isAtBottom);
|
|
3288
3568
|
};
|
|
3289
|
-
return /* @__PURE__ */
|
|
3290
|
-
/* @__PURE__ */
|
|
3291
|
-
/* @__PURE__ */
|
|
3292
|
-
/* @__PURE__ */
|
|
3293
|
-
/* @__PURE__ */
|
|
3569
|
+
return /* @__PURE__ */ jsxs19("div", { className: cn("flex flex-col h-full bg-surface-dim text-foreground font-mono text-sm leading-relaxed overflow-hidden rounded-lg border border-[var(--md3-outline-variant)]", className), children: [
|
|
3570
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex-none flex items-center justify-between border-b border-[var(--md3-outline-variant)] bg-surface-container-high backdrop-blur-md px-4 py-2", children: [
|
|
3571
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-2", children: [
|
|
3572
|
+
/* @__PURE__ */ jsx22(Terminal3, { className: "h-4 w-4 text-primary animate-pulse" }),
|
|
3573
|
+
/* @__PURE__ */ jsx22("span", { className: "font-bold text-xs uppercase tracking-widest text-muted-foreground", children: "System Traces" })
|
|
3294
3574
|
] }),
|
|
3295
|
-
/* @__PURE__ */
|
|
3296
|
-
error && /* @__PURE__ */
|
|
3297
|
-
/* @__PURE__ */
|
|
3575
|
+
/* @__PURE__ */ jsxs19("div", { className: "flex items-center gap-3", children: [
|
|
3576
|
+
error && /* @__PURE__ */ jsxs19("span", { className: "text-destructive text-xs flex items-center gap-1", children: [
|
|
3577
|
+
/* @__PURE__ */ jsx22("span", { className: "w-2 h-2 rounded-full bg-destructive animate-ping" }),
|
|
3298
3578
|
" Error fetching logs"
|
|
3299
3579
|
] }),
|
|
3300
|
-
/* @__PURE__ */
|
|
3580
|
+
/* @__PURE__ */ jsx22(
|
|
3301
3581
|
"button",
|
|
3302
3582
|
{
|
|
3303
3583
|
onClick: () => {
|
|
@@ -3312,29 +3592,29 @@ function SystemLogsViewer({ apiUrl, token, className }) {
|
|
|
3312
3592
|
)
|
|
3313
3593
|
] })
|
|
3314
3594
|
] }),
|
|
3315
|
-
/* @__PURE__ */
|
|
3595
|
+
/* @__PURE__ */ jsx22(
|
|
3316
3596
|
"div",
|
|
3317
3597
|
{
|
|
3318
3598
|
ref: scrollRef,
|
|
3319
3599
|
onScroll: handleScroll,
|
|
3320
3600
|
className: "flex-1 overflow-y-auto p-4 space-y-1",
|
|
3321
|
-
children: logs.length === 0 && !error ? /* @__PURE__ */
|
|
3322
|
-
/* @__PURE__ */
|
|
3601
|
+
children: logs.length === 0 && !error ? /* @__PURE__ */ jsx22("div", { className: "flex h-full items-center justify-center text-muted-foreground italic", children: "Waiting for orchestrator logs..." }) : logs.map((log, i) => /* @__PURE__ */ jsxs19("div", { className: "break-words", children: [
|
|
3602
|
+
/* @__PURE__ */ jsxs19("span", { className: "text-muted-foreground mr-3 select-none", children: [
|
|
3323
3603
|
"[",
|
|
3324
3604
|
log.timestamp || i.toString().padStart(4, "0"),
|
|
3325
3605
|
"]"
|
|
3326
3606
|
] }),
|
|
3327
|
-
/* @__PURE__ */
|
|
3607
|
+
/* @__PURE__ */ jsxs19("span", { className: "text-primary/70 mr-2", children: [
|
|
3328
3608
|
"[",
|
|
3329
3609
|
log.level,
|
|
3330
3610
|
"]"
|
|
3331
3611
|
] }),
|
|
3332
|
-
/* @__PURE__ */
|
|
3612
|
+
/* @__PURE__ */ jsxs19("span", { className: "text-muted-foreground mr-2", children: [
|
|
3333
3613
|
"[",
|
|
3334
3614
|
log.scope,
|
|
3335
3615
|
"]"
|
|
3336
3616
|
] }),
|
|
3337
|
-
/* @__PURE__ */
|
|
3617
|
+
/* @__PURE__ */ jsx22("span", { className: log.level.toUpperCase() === "ERROR" || log.message.toLowerCase().includes("failed") ? "text-destructive" : log.level.toUpperCase() === "WARN" ? "text-warning" : "text-foreground", children: log.message })
|
|
3338
3618
|
] }, `${log.timestamp}-${log.scope}-${i}`))
|
|
3339
3619
|
}
|
|
3340
3620
|
)
|
|
@@ -3345,50 +3625,50 @@ function SystemLogsViewer({ apiUrl, token, className }) {
|
|
|
3345
3625
|
import { Clock as Clock4, Layers, MessageSquare, DollarSign } from "lucide-react";
|
|
3346
3626
|
import { StatCard } from "@tangle-network/ui/primitives";
|
|
3347
3627
|
import { Skeleton as Skeleton4 } from "@tangle-network/ui/primitives";
|
|
3348
|
-
import { jsx as
|
|
3628
|
+
import { jsx as jsx23, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3349
3629
|
function UsageSummary({ data, loading = false, className }) {
|
|
3350
3630
|
if (loading || !data) {
|
|
3351
|
-
return /* @__PURE__ */
|
|
3631
|
+
return /* @__PURE__ */ jsx23("div", { className: cn("grid grid-cols-2 gap-4 lg:grid-cols-4", className), children: Array.from({ length: 4 }).map((_, i) => /* @__PURE__ */ jsx23(Skeleton4, { className: "h-28 rounded-xl" }, i)) });
|
|
3352
3632
|
}
|
|
3353
|
-
return /* @__PURE__ */
|
|
3354
|
-
/* @__PURE__ */
|
|
3633
|
+
return /* @__PURE__ */ jsxs20("div", { className: cn("grid grid-cols-2 gap-4 lg:grid-cols-4", className), children: [
|
|
3634
|
+
/* @__PURE__ */ jsx23(
|
|
3355
3635
|
StatCard,
|
|
3356
3636
|
{
|
|
3357
3637
|
variant: "sandbox",
|
|
3358
3638
|
title: "Compute Hours",
|
|
3359
3639
|
value: data.computeHours.toFixed(1),
|
|
3360
3640
|
subtitle: "This billing period",
|
|
3361
|
-
icon: /* @__PURE__ */
|
|
3641
|
+
icon: /* @__PURE__ */ jsx23(Clock4, { className: "h-5 w-5" })
|
|
3362
3642
|
}
|
|
3363
3643
|
),
|
|
3364
|
-
/* @__PURE__ */
|
|
3644
|
+
/* @__PURE__ */ jsx23(
|
|
3365
3645
|
StatCard,
|
|
3366
3646
|
{
|
|
3367
3647
|
variant: "sandbox",
|
|
3368
3648
|
title: "Active Sessions",
|
|
3369
3649
|
value: data.activeSessions,
|
|
3370
3650
|
subtitle: "Currently running",
|
|
3371
|
-
icon: /* @__PURE__ */
|
|
3651
|
+
icon: /* @__PURE__ */ jsx23(Layers, { className: "h-5 w-5" })
|
|
3372
3652
|
}
|
|
3373
3653
|
),
|
|
3374
|
-
/* @__PURE__ */
|
|
3654
|
+
/* @__PURE__ */ jsx23(
|
|
3375
3655
|
StatCard,
|
|
3376
3656
|
{
|
|
3377
3657
|
variant: "sandbox",
|
|
3378
3658
|
title: "Messages Sent",
|
|
3379
3659
|
value: data.messagesSent.toLocaleString(),
|
|
3380
3660
|
subtitle: "Agent interactions",
|
|
3381
|
-
icon: /* @__PURE__ */
|
|
3661
|
+
icon: /* @__PURE__ */ jsx23(MessageSquare, { className: "h-5 w-5" })
|
|
3382
3662
|
}
|
|
3383
3663
|
),
|
|
3384
|
-
/* @__PURE__ */
|
|
3664
|
+
/* @__PURE__ */ jsx23(
|
|
3385
3665
|
StatCard,
|
|
3386
3666
|
{
|
|
3387
3667
|
variant: "sandbox",
|
|
3388
3668
|
title: "Estimated Cost",
|
|
3389
3669
|
value: `$${data.estimatedCost.toFixed(2)}`,
|
|
3390
3670
|
subtitle: "This billing period",
|
|
3391
|
-
icon: /* @__PURE__ */
|
|
3671
|
+
icon: /* @__PURE__ */ jsx23(DollarSign, { className: "h-5 w-5" })
|
|
3392
3672
|
}
|
|
3393
3673
|
)
|
|
3394
3674
|
] });
|
|
@@ -3396,25 +3676,25 @@ function UsageSummary({ data, loading = false, className }) {
|
|
|
3396
3676
|
|
|
3397
3677
|
// src/dashboard/git-panel.tsx
|
|
3398
3678
|
import { GitBranch, GitCommit, FileEdit, FilePlus, File } from "lucide-react";
|
|
3399
|
-
import { jsx as
|
|
3679
|
+
import { jsx as jsx24, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3400
3680
|
function GitPanel({ status, log, loading = false, onRefresh, className }) {
|
|
3401
3681
|
if (loading) {
|
|
3402
|
-
return /* @__PURE__ */
|
|
3682
|
+
return /* @__PURE__ */ jsxs21(
|
|
3403
3683
|
"div",
|
|
3404
3684
|
{
|
|
3405
3685
|
className: cn("rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container overflow-hidden", className),
|
|
3406
3686
|
"aria-busy": "true",
|
|
3407
3687
|
children: [
|
|
3408
|
-
/* @__PURE__ */
|
|
3409
|
-
/* @__PURE__ */
|
|
3410
|
-
/* @__PURE__ */
|
|
3411
|
-
/* @__PURE__ */
|
|
3688
|
+
/* @__PURE__ */ jsx24("span", { className: "sr-only", children: "Loading git info\u2026" }),
|
|
3689
|
+
/* @__PURE__ */ jsx24("div", { className: "flex items-center justify-between border-b border-[var(--md3-outline-variant)] bg-surface-container-high px-4 py-3", children: /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2", children: [
|
|
3690
|
+
/* @__PURE__ */ jsx24(GitBranch, { className: "h-4 w-4 text-muted-foreground" }),
|
|
3691
|
+
/* @__PURE__ */ jsx24("div", { className: "h-3.5 w-24 animate-pulse rounded bg-muted" })
|
|
3412
3692
|
] }) }),
|
|
3413
|
-
/* @__PURE__ */
|
|
3414
|
-
/* @__PURE__ */
|
|
3415
|
-
/* @__PURE__ */
|
|
3416
|
-
/* @__PURE__ */
|
|
3417
|
-
/* @__PURE__ */
|
|
3693
|
+
/* @__PURE__ */ jsxs21("div", { className: "px-4 py-3", children: [
|
|
3694
|
+
/* @__PURE__ */ jsx24("div", { className: "mb-2 h-2.5 w-20 animate-pulse rounded bg-muted" }),
|
|
3695
|
+
/* @__PURE__ */ jsx24("div", { className: "space-y-2.5", children: [0, 1, 2].map((row) => /* @__PURE__ */ jsxs21("div", { className: "flex items-start gap-2", children: [
|
|
3696
|
+
/* @__PURE__ */ jsx24(GitCommit, { className: "mt-0.5 h-3 w-3 shrink-0 text-muted-foreground" }),
|
|
3697
|
+
/* @__PURE__ */ jsx24("div", { className: "h-3 w-3/4 animate-pulse rounded bg-muted" })
|
|
3418
3698
|
] }, row)) })
|
|
3419
3699
|
] })
|
|
3420
3700
|
]
|
|
@@ -3422,57 +3702,57 @@ function GitPanel({ status, log, loading = false, onRefresh, className }) {
|
|
|
3422
3702
|
);
|
|
3423
3703
|
}
|
|
3424
3704
|
if (!status) {
|
|
3425
|
-
return /* @__PURE__ */
|
|
3426
|
-
/* @__PURE__ */
|
|
3705
|
+
return /* @__PURE__ */ jsx24("div", { className: cn("rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container p-5", className), children: /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
3706
|
+
/* @__PURE__ */ jsx24(GitBranch, { className: "h-4 w-4" }),
|
|
3427
3707
|
"No git repository detected"
|
|
3428
3708
|
] }) });
|
|
3429
3709
|
}
|
|
3430
3710
|
const changedCount = status.staged.length + status.modified.length + status.untracked.length;
|
|
3431
|
-
return /* @__PURE__ */
|
|
3432
|
-
/* @__PURE__ */
|
|
3433
|
-
/* @__PURE__ */
|
|
3434
|
-
/* @__PURE__ */
|
|
3435
|
-
/* @__PURE__ */
|
|
3436
|
-
status.isDirty && /* @__PURE__ */
|
|
3711
|
+
return /* @__PURE__ */ jsxs21("div", { className: cn("rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container overflow-hidden", className), children: [
|
|
3712
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-center justify-between border-b border-[var(--md3-outline-variant)] bg-surface-container-high px-4 py-3", children: [
|
|
3713
|
+
/* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2", children: [
|
|
3714
|
+
/* @__PURE__ */ jsx24(GitBranch, { className: "h-4 w-4 text-primary" }),
|
|
3715
|
+
/* @__PURE__ */ jsx24("span", { className: "text-sm font-bold text-foreground", children: status.branch }),
|
|
3716
|
+
status.isDirty && /* @__PURE__ */ jsxs21("span", { className: "rounded-full bg-[var(--surface-warning-bg)] px-1.5 py-0.5 text-[10px] font-bold text-[var(--surface-warning-text)]", children: [
|
|
3437
3717
|
changedCount,
|
|
3438
3718
|
" change",
|
|
3439
3719
|
changedCount !== 1 ? "s" : ""
|
|
3440
3720
|
] })
|
|
3441
3721
|
] }),
|
|
3442
|
-
onRefresh && /* @__PURE__ */
|
|
3722
|
+
onRefresh && /* @__PURE__ */ jsx24("button", { type: "button", onClick: onRefresh, className: "text-xs text-muted-foreground hover:text-foreground transition-colors", children: "Refresh" })
|
|
3443
3723
|
] }),
|
|
3444
|
-
changedCount > 0 && /* @__PURE__ */
|
|
3445
|
-
status.staged.map((f) => /* @__PURE__ */
|
|
3446
|
-
/* @__PURE__ */
|
|
3447
|
-
/* @__PURE__ */
|
|
3448
|
-
/* @__PURE__ */
|
|
3724
|
+
changedCount > 0 && /* @__PURE__ */ jsx24("div", { className: "border-b border-[var(--md3-outline-variant)] px-4 py-3", children: /* @__PURE__ */ jsxs21("div", { className: "space-y-1.5", children: [
|
|
3725
|
+
status.staged.map((f) => /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2 text-xs", children: [
|
|
3726
|
+
/* @__PURE__ */ jsx24(FilePlus, { className: "h-3 w-3 text-[var(--surface-success-text)]" }),
|
|
3727
|
+
/* @__PURE__ */ jsx24("span", { className: "font-mono text-foreground truncate", children: f }),
|
|
3728
|
+
/* @__PURE__ */ jsx24("span", { className: "text-[var(--surface-success-text)] text-[10px] font-bold ml-auto", children: "STAGED" })
|
|
3449
3729
|
] }, `s-${f}`)),
|
|
3450
|
-
status.modified.map((f) => /* @__PURE__ */
|
|
3451
|
-
/* @__PURE__ */
|
|
3452
|
-
/* @__PURE__ */
|
|
3730
|
+
status.modified.map((f) => /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2 text-xs", children: [
|
|
3731
|
+
/* @__PURE__ */ jsx24(FileEdit, { className: "h-3 w-3 text-[var(--surface-warning-text)]" }),
|
|
3732
|
+
/* @__PURE__ */ jsx24("span", { className: "font-mono text-foreground truncate", children: f })
|
|
3453
3733
|
] }, `m-${f}`)),
|
|
3454
|
-
status.untracked.map((f) => /* @__PURE__ */
|
|
3455
|
-
/* @__PURE__ */
|
|
3456
|
-
/* @__PURE__ */
|
|
3734
|
+
status.untracked.map((f) => /* @__PURE__ */ jsxs21("div", { className: "flex items-center gap-2 text-xs", children: [
|
|
3735
|
+
/* @__PURE__ */ jsx24(File, { className: "h-3 w-3 text-muted-foreground" }),
|
|
3736
|
+
/* @__PURE__ */ jsx24("span", { className: "font-mono text-muted-foreground truncate", children: f })
|
|
3457
3737
|
] }, `u-${f}`))
|
|
3458
3738
|
] }) }),
|
|
3459
|
-
log.length > 0 && /* @__PURE__ */
|
|
3460
|
-
/* @__PURE__ */
|
|
3461
|
-
/* @__PURE__ */
|
|
3462
|
-
/* @__PURE__ */
|
|
3463
|
-
/* @__PURE__ */
|
|
3464
|
-
/* @__PURE__ */
|
|
3465
|
-
/* @__PURE__ */
|
|
3739
|
+
log.length > 0 && /* @__PURE__ */ jsxs21("div", { className: "px-4 py-3", children: [
|
|
3740
|
+
/* @__PURE__ */ jsx24("div", { className: "mb-2 text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: "Recent Commits" }),
|
|
3741
|
+
/* @__PURE__ */ jsx24("div", { className: "space-y-2", children: log.slice(0, 5).map((commit) => /* @__PURE__ */ jsxs21("div", { className: "flex items-start gap-2 text-xs", children: [
|
|
3742
|
+
/* @__PURE__ */ jsx24(GitCommit, { className: "h-3 w-3 text-muted-foreground mt-0.5 shrink-0" }),
|
|
3743
|
+
/* @__PURE__ */ jsxs21("div", { className: "min-w-0", children: [
|
|
3744
|
+
/* @__PURE__ */ jsx24("span", { className: "font-mono text-primary mr-1.5", children: commit.shortSha }),
|
|
3745
|
+
/* @__PURE__ */ jsx24("span", { className: "text-foreground", children: commit.message })
|
|
3466
3746
|
] })
|
|
3467
3747
|
] }, commit.shortSha)) })
|
|
3468
3748
|
] }),
|
|
3469
|
-
(status.ahead > 0 || status.behind > 0) && /* @__PURE__ */
|
|
3470
|
-
status.ahead > 0 && /* @__PURE__ */
|
|
3749
|
+
(status.ahead > 0 || status.behind > 0) && /* @__PURE__ */ jsxs21("div", { className: "border-t border-[var(--md3-outline-variant)] px-4 py-2 flex items-center gap-3 text-xs text-muted-foreground", children: [
|
|
3750
|
+
status.ahead > 0 && /* @__PURE__ */ jsxs21("span", { children: [
|
|
3471
3751
|
"\u2191 ",
|
|
3472
3752
|
status.ahead,
|
|
3473
3753
|
" ahead"
|
|
3474
3754
|
] }),
|
|
3475
|
-
status.behind > 0 && /* @__PURE__ */
|
|
3755
|
+
status.behind > 0 && /* @__PURE__ */ jsxs21("span", { children: [
|
|
3476
3756
|
"\u2193 ",
|
|
3477
3757
|
status.behind,
|
|
3478
3758
|
" behind"
|
|
@@ -3484,7 +3764,7 @@ function GitPanel({ status, log, loading = false, onRefresh, className }) {
|
|
|
3484
3764
|
// src/dashboard/ports-list.tsx
|
|
3485
3765
|
import * as React13 from "react";
|
|
3486
3766
|
import { Copy as Copy3, Check as Check5, Globe, Plus as Plus4, Trash2 as Trash23 } from "lucide-react";
|
|
3487
|
-
import { jsx as
|
|
3767
|
+
import { jsx as jsx25, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3488
3768
|
function PortsList({ ports, onExposePort, onRemovePort, isExposing = false, className }) {
|
|
3489
3769
|
const [newPort, setNewPort] = React13.useState("");
|
|
3490
3770
|
const [copiedPort, setCopiedPort] = React13.useState(null);
|
|
@@ -3511,48 +3791,48 @@ function PortsList({ ports, onExposePort, onRemovePort, isExposing = false, clas
|
|
|
3511
3791
|
setNewPort("");
|
|
3512
3792
|
}
|
|
3513
3793
|
};
|
|
3514
|
-
return /* @__PURE__ */
|
|
3515
|
-
ports.length > 0 ? /* @__PURE__ */
|
|
3516
|
-
/* @__PURE__ */
|
|
3517
|
-
/* @__PURE__ */
|
|
3518
|
-
/* @__PURE__ */
|
|
3519
|
-
/* @__PURE__ */
|
|
3520
|
-
/* @__PURE__ */
|
|
3794
|
+
return /* @__PURE__ */ jsxs22("div", { className: cn("space-y-4", className), children: [
|
|
3795
|
+
ports.length > 0 ? /* @__PURE__ */ jsx25("div", { className: "rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container overflow-hidden", children: /* @__PURE__ */ jsxs22("table", { className: "w-full text-sm", children: [
|
|
3796
|
+
/* @__PURE__ */ jsx25("thead", { className: "bg-surface-container-high border-b border-[var(--md3-outline-variant)]", children: /* @__PURE__ */ jsxs22("tr", { children: [
|
|
3797
|
+
/* @__PURE__ */ jsx25("th", { className: "px-4 py-2.5 text-left text-xs font-medium text-muted-foreground", children: "Port" }),
|
|
3798
|
+
/* @__PURE__ */ jsx25("th", { className: "px-4 py-2.5 text-left text-xs font-medium text-muted-foreground", children: "Public URL" }),
|
|
3799
|
+
/* @__PURE__ */ jsx25("th", { className: "px-4 py-2.5 text-left text-xs font-medium text-muted-foreground", children: "Status" }),
|
|
3800
|
+
/* @__PURE__ */ jsx25("th", { className: "px-4 py-2.5 text-right text-xs font-medium text-muted-foreground w-20" })
|
|
3521
3801
|
] }) }),
|
|
3522
|
-
/* @__PURE__ */
|
|
3523
|
-
/* @__PURE__ */
|
|
3524
|
-
/* @__PURE__ */
|
|
3802
|
+
/* @__PURE__ */ jsx25("tbody", { className: "divide-y divide-border", children: ports.map((p) => /* @__PURE__ */ jsxs22("tr", { children: [
|
|
3803
|
+
/* @__PURE__ */ jsx25("td", { className: "px-4 py-3 font-mono text-xs text-foreground", children: p.port }),
|
|
3804
|
+
/* @__PURE__ */ jsx25("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsxs22(
|
|
3525
3805
|
"button",
|
|
3526
3806
|
{
|
|
3527
3807
|
type: "button",
|
|
3528
3808
|
onClick: () => handleCopy(p.url, p.port),
|
|
3529
3809
|
className: "flex items-center gap-2 font-mono text-xs text-primary hover:underline cursor-pointer group",
|
|
3530
3810
|
children: [
|
|
3531
|
-
/* @__PURE__ */
|
|
3532
|
-
copiedPort === p.port ? /* @__PURE__ */
|
|
3811
|
+
/* @__PURE__ */ jsx25("span", { className: "truncate max-w-[300px]", children: p.url }),
|
|
3812
|
+
copiedPort === p.port ? /* @__PURE__ */ jsx25(Check5, { className: "h-3 w-3 text-[var(--surface-success-text)] shrink-0" }) : /* @__PURE__ */ jsx25(Copy3, { className: "h-3 w-3 opacity-0 group-hover:opacity-100 transition-opacity shrink-0" })
|
|
3533
3813
|
]
|
|
3534
3814
|
}
|
|
3535
3815
|
) }),
|
|
3536
|
-
/* @__PURE__ */
|
|
3816
|
+
/* @__PURE__ */ jsx25("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsx25("span", { className: cn(
|
|
3537
3817
|
"inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",
|
|
3538
3818
|
p.status === "active" ? "bg-[var(--surface-success-bg)] text-[var(--surface-success-text)]" : "bg-[var(--surface-warning-bg)] text-[var(--surface-warning-text)]"
|
|
3539
3819
|
), children: p.status }) }),
|
|
3540
|
-
/* @__PURE__ */
|
|
3820
|
+
/* @__PURE__ */ jsx25("td", { className: "px-4 py-3 text-right", children: onRemovePort && /* @__PURE__ */ jsx25(
|
|
3541
3821
|
"button",
|
|
3542
3822
|
{
|
|
3543
3823
|
type: "button",
|
|
3544
3824
|
onClick: () => onRemovePort(p.port),
|
|
3545
3825
|
className: "p-1 text-muted-foreground hover:text-destructive transition-colors rounded",
|
|
3546
|
-
children: /* @__PURE__ */
|
|
3826
|
+
children: /* @__PURE__ */ jsx25(Trash23, { className: "h-3.5 w-3.5" })
|
|
3547
3827
|
}
|
|
3548
3828
|
) })
|
|
3549
3829
|
] }, p.port)) })
|
|
3550
|
-
] }) }) : /* @__PURE__ */
|
|
3551
|
-
/* @__PURE__ */
|
|
3552
|
-
/* @__PURE__ */
|
|
3830
|
+
] }) }) : /* @__PURE__ */ jsxs22("div", { className: "rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container p-6 text-center", children: [
|
|
3831
|
+
/* @__PURE__ */ jsx25(Globe, { className: "mx-auto h-8 w-8 text-muted-foreground mb-2" }),
|
|
3832
|
+
/* @__PURE__ */ jsx25("p", { className: "text-sm text-muted-foreground", children: "No ports exposed yet" })
|
|
3553
3833
|
] }),
|
|
3554
|
-
/* @__PURE__ */
|
|
3555
|
-
/* @__PURE__ */
|
|
3834
|
+
/* @__PURE__ */ jsxs22("div", { className: "flex items-center gap-3", children: [
|
|
3835
|
+
/* @__PURE__ */ jsx25(
|
|
3556
3836
|
"input",
|
|
3557
3837
|
{
|
|
3558
3838
|
type: "number",
|
|
@@ -3565,7 +3845,7 @@ function PortsList({ ports, onExposePort, onRemovePort, isExposing = false, clas
|
|
|
3565
3845
|
className: "flex-1 rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container-low px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
3566
3846
|
}
|
|
3567
3847
|
),
|
|
3568
|
-
/* @__PURE__ */
|
|
3848
|
+
/* @__PURE__ */ jsxs22(
|
|
3569
3849
|
"button",
|
|
3570
3850
|
{
|
|
3571
3851
|
type: "button",
|
|
@@ -3573,7 +3853,7 @@ function PortsList({ ports, onExposePort, onRemovePort, isExposing = false, clas
|
|
|
3573
3853
|
disabled: !newPort || isExposing,
|
|
3574
3854
|
className: "inline-flex items-center gap-2 rounded-lg bg-primary/20 border border-primary/30 px-4 py-2 text-sm font-medium text-primary hover:bg-primary hover:text-primary-foreground transition-colors disabled:opacity-50",
|
|
3575
3855
|
children: [
|
|
3576
|
-
/* @__PURE__ */
|
|
3856
|
+
/* @__PURE__ */ jsx25(Plus4, { className: "h-4 w-4" }),
|
|
3577
3857
|
"Expose"
|
|
3578
3858
|
]
|
|
3579
3859
|
}
|
|
@@ -3584,8 +3864,8 @@ function PortsList({ ports, onExposePort, onRemovePort, isExposing = false, clas
|
|
|
3584
3864
|
|
|
3585
3865
|
// src/dashboard/process-list.tsx
|
|
3586
3866
|
import * as React14 from "react";
|
|
3587
|
-
import { Activity as Activity3, Plus as Plus5, Skull, Terminal as
|
|
3588
|
-
import { jsx as
|
|
3867
|
+
import { Activity as Activity3, Plus as Plus5, Skull, Terminal as Terminal4 } from "lucide-react";
|
|
3868
|
+
import { jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3589
3869
|
function formatUptime(startedAt) {
|
|
3590
3870
|
if (!startedAt) return "-";
|
|
3591
3871
|
const ms = Date.now() - new Date(startedAt).getTime();
|
|
@@ -3603,43 +3883,43 @@ function ProcessList({ processes, onSpawn, onKill, loading = false, className })
|
|
|
3603
3883
|
setNewCommand("");
|
|
3604
3884
|
}
|
|
3605
3885
|
};
|
|
3606
|
-
return /* @__PURE__ */
|
|
3607
|
-
loading ? /* @__PURE__ */
|
|
3608
|
-
/* @__PURE__ */
|
|
3609
|
-
/* @__PURE__ */
|
|
3610
|
-
] }) : processes.length > 0 ? /* @__PURE__ */
|
|
3611
|
-
/* @__PURE__ */
|
|
3612
|
-
/* @__PURE__ */
|
|
3613
|
-
/* @__PURE__ */
|
|
3614
|
-
/* @__PURE__ */
|
|
3615
|
-
/* @__PURE__ */
|
|
3616
|
-
/* @__PURE__ */
|
|
3886
|
+
return /* @__PURE__ */ jsxs23("div", { className: cn("space-y-4", className), children: [
|
|
3887
|
+
loading ? /* @__PURE__ */ jsxs23("div", { className: "rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container p-6 text-center", children: [
|
|
3888
|
+
/* @__PURE__ */ jsx26(Activity3, { className: "mx-auto h-6 w-6 text-muted-foreground animate-spin mb-2" }),
|
|
3889
|
+
/* @__PURE__ */ jsx26("p", { className: "text-sm text-muted-foreground", children: "Loading processes..." })
|
|
3890
|
+
] }) : processes.length > 0 ? /* @__PURE__ */ jsx26("div", { className: "rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container overflow-hidden", children: /* @__PURE__ */ jsxs23("table", { className: "w-full text-sm", children: [
|
|
3891
|
+
/* @__PURE__ */ jsx26("thead", { className: "bg-surface-container-high border-b border-[var(--md3-outline-variant)]", children: /* @__PURE__ */ jsxs23("tr", { children: [
|
|
3892
|
+
/* @__PURE__ */ jsx26("th", { className: "px-4 py-2.5 text-left text-xs font-medium text-muted-foreground", children: "PID" }),
|
|
3893
|
+
/* @__PURE__ */ jsx26("th", { className: "px-4 py-2.5 text-left text-xs font-medium text-muted-foreground", children: "Command" }),
|
|
3894
|
+
/* @__PURE__ */ jsx26("th", { className: "px-4 py-2.5 text-left text-xs font-medium text-muted-foreground", children: "Status" }),
|
|
3895
|
+
/* @__PURE__ */ jsx26("th", { className: "px-4 py-2.5 text-left text-xs font-medium text-muted-foreground", children: "Uptime" }),
|
|
3896
|
+
/* @__PURE__ */ jsx26("th", { className: "px-4 py-2.5 text-right text-xs font-medium text-muted-foreground w-20" })
|
|
3617
3897
|
] }) }),
|
|
3618
|
-
/* @__PURE__ */
|
|
3619
|
-
/* @__PURE__ */
|
|
3620
|
-
/* @__PURE__ */
|
|
3621
|
-
/* @__PURE__ */
|
|
3898
|
+
/* @__PURE__ */ jsx26("tbody", { className: "divide-y divide-border", children: processes.map((p) => /* @__PURE__ */ jsxs23("tr", { children: [
|
|
3899
|
+
/* @__PURE__ */ jsx26("td", { className: "px-4 py-3 font-mono text-xs text-foreground", children: p.pid }),
|
|
3900
|
+
/* @__PURE__ */ jsx26("td", { className: "px-4 py-3 font-mono text-xs text-foreground truncate max-w-[250px]", children: p.command }),
|
|
3901
|
+
/* @__PURE__ */ jsx26("td", { className: "px-4 py-3", children: /* @__PURE__ */ jsx26("span", { className: cn(
|
|
3622
3902
|
"inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",
|
|
3623
3903
|
p.running ? "bg-[var(--surface-success-bg)] text-[var(--surface-success-text)]" : "bg-surface-container-high text-muted-foreground"
|
|
3624
3904
|
), children: p.running ? "running" : `exited (${p.exitCode ?? "?"})` }) }),
|
|
3625
|
-
/* @__PURE__ */
|
|
3626
|
-
/* @__PURE__ */
|
|
3905
|
+
/* @__PURE__ */ jsx26("td", { className: "px-4 py-3 font-mono text-xs text-muted-foreground", children: formatUptime(p.startedAt) }),
|
|
3906
|
+
/* @__PURE__ */ jsx26("td", { className: "px-4 py-3 text-right", children: p.running && /* @__PURE__ */ jsx26(
|
|
3627
3907
|
"button",
|
|
3628
3908
|
{
|
|
3629
3909
|
type: "button",
|
|
3630
3910
|
onClick: () => onKill(p.pid),
|
|
3631
3911
|
className: "p-1 text-muted-foreground hover:text-destructive transition-colors rounded",
|
|
3632
3912
|
title: "Kill process",
|
|
3633
|
-
children: /* @__PURE__ */
|
|
3913
|
+
children: /* @__PURE__ */ jsx26(Skull, { className: "h-3.5 w-3.5" })
|
|
3634
3914
|
}
|
|
3635
3915
|
) })
|
|
3636
3916
|
] }, `${p.pid}-${p.startedAt ?? p.command}`)) })
|
|
3637
|
-
] }) }) : /* @__PURE__ */
|
|
3638
|
-
/* @__PURE__ */
|
|
3639
|
-
/* @__PURE__ */
|
|
3917
|
+
] }) }) : /* @__PURE__ */ jsxs23("div", { className: "rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container p-6 text-center", children: [
|
|
3918
|
+
/* @__PURE__ */ jsx26(Terminal4, { className: "mx-auto h-8 w-8 text-muted-foreground mb-2" }),
|
|
3919
|
+
/* @__PURE__ */ jsx26("p", { className: "text-sm text-muted-foreground", children: "No processes running" })
|
|
3640
3920
|
] }),
|
|
3641
|
-
/* @__PURE__ */
|
|
3642
|
-
/* @__PURE__ */
|
|
3921
|
+
/* @__PURE__ */ jsxs23("div", { className: "flex items-center gap-3", children: [
|
|
3922
|
+
/* @__PURE__ */ jsx26(
|
|
3643
3923
|
"input",
|
|
3644
3924
|
{
|
|
3645
3925
|
type: "text",
|
|
@@ -3650,7 +3930,7 @@ function ProcessList({ processes, onSpawn, onKill, loading = false, className })
|
|
|
3650
3930
|
className: "flex-1 rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container-low px-3 py-2 text-sm font-mono text-foreground placeholder:text-muted-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
3651
3931
|
}
|
|
3652
3932
|
),
|
|
3653
|
-
/* @__PURE__ */
|
|
3933
|
+
/* @__PURE__ */ jsxs23(
|
|
3654
3934
|
"button",
|
|
3655
3935
|
{
|
|
3656
3936
|
type: "button",
|
|
@@ -3658,7 +3938,7 @@ function ProcessList({ processes, onSpawn, onKill, loading = false, className })
|
|
|
3658
3938
|
disabled: !newCommand.trim(),
|
|
3659
3939
|
className: "inline-flex items-center gap-2 rounded-lg bg-primary/20 border border-primary/30 px-4 py-2 text-sm font-medium text-primary hover:bg-primary hover:text-primary-foreground transition-colors disabled:opacity-50",
|
|
3660
3940
|
children: [
|
|
3661
|
-
/* @__PURE__ */
|
|
3941
|
+
/* @__PURE__ */ jsx26(Plus5, { className: "h-4 w-4" }),
|
|
3662
3942
|
"Spawn"
|
|
3663
3943
|
]
|
|
3664
3944
|
}
|
|
@@ -3670,7 +3950,7 @@ function ProcessList({ processes, onSpawn, onKill, loading = false, className })
|
|
|
3670
3950
|
// src/dashboard/network-config.tsx
|
|
3671
3951
|
import * as React15 from "react";
|
|
3672
3952
|
import { Network as Network2, Plus as Plus6, Trash2 as Trash24, ShieldAlert } from "lucide-react";
|
|
3673
|
-
import { jsx as
|
|
3953
|
+
import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3674
3954
|
function NetworkConfig({ config, onUpdate, loading = false, className }) {
|
|
3675
3955
|
const [newCidr, setNewCidr] = React15.useState("");
|
|
3676
3956
|
const isValidCidr = (value) => {
|
|
@@ -3693,21 +3973,21 @@ function NetworkConfig({ config, onUpdate, loading = false, className }) {
|
|
|
3693
3973
|
}
|
|
3694
3974
|
};
|
|
3695
3975
|
if (loading || !config) {
|
|
3696
|
-
return /* @__PURE__ */
|
|
3697
|
-
/* @__PURE__ */
|
|
3698
|
-
/* @__PURE__ */
|
|
3976
|
+
return /* @__PURE__ */ jsxs24("div", { className: cn("rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container p-6 text-center", className), children: [
|
|
3977
|
+
/* @__PURE__ */ jsx27(Network2, { className: "mx-auto h-6 w-6 text-muted-foreground animate-pulse mb-2" }),
|
|
3978
|
+
/* @__PURE__ */ jsx27("p", { className: "text-sm text-muted-foreground", children: "Loading network configuration..." })
|
|
3699
3979
|
] });
|
|
3700
3980
|
}
|
|
3701
|
-
return /* @__PURE__ */
|
|
3702
|
-
/* @__PURE__ */
|
|
3703
|
-
/* @__PURE__ */
|
|
3704
|
-
/* @__PURE__ */
|
|
3705
|
-
/* @__PURE__ */
|
|
3706
|
-
/* @__PURE__ */
|
|
3707
|
-
/* @__PURE__ */
|
|
3981
|
+
return /* @__PURE__ */ jsxs24("div", { className: cn("space-y-4", className), children: [
|
|
3982
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center justify-between rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container px-4 py-3", children: [
|
|
3983
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-3", children: [
|
|
3984
|
+
/* @__PURE__ */ jsx27(ShieldAlert, { className: "h-4 w-4 text-muted-foreground" }),
|
|
3985
|
+
/* @__PURE__ */ jsxs24("div", { children: [
|
|
3986
|
+
/* @__PURE__ */ jsx27("p", { className: "text-sm font-medium text-foreground", children: "Block Outbound Traffic" }),
|
|
3987
|
+
/* @__PURE__ */ jsx27("p", { className: "text-xs text-muted-foreground", children: "Prevent the sandbox from making external network requests" })
|
|
3708
3988
|
] })
|
|
3709
3989
|
] }),
|
|
3710
|
-
/* @__PURE__ */
|
|
3990
|
+
/* @__PURE__ */ jsx27(
|
|
3711
3991
|
"button",
|
|
3712
3992
|
{
|
|
3713
3993
|
type: "button",
|
|
@@ -3719,7 +3999,7 @@ function NetworkConfig({ config, onUpdate, loading = false, className }) {
|
|
|
3719
3999
|
"relative inline-flex h-6 w-11 items-center rounded-full transition-colors",
|
|
3720
4000
|
config.blockOutbound ? "bg-destructive" : "bg-surface-container-high"
|
|
3721
4001
|
),
|
|
3722
|
-
children: /* @__PURE__ */
|
|
4002
|
+
children: /* @__PURE__ */ jsx27(
|
|
3723
4003
|
"span",
|
|
3724
4004
|
{
|
|
3725
4005
|
className: cn(
|
|
@@ -3731,22 +4011,22 @@ function NetworkConfig({ config, onUpdate, loading = false, className }) {
|
|
|
3731
4011
|
}
|
|
3732
4012
|
)
|
|
3733
4013
|
] }),
|
|
3734
|
-
/* @__PURE__ */
|
|
3735
|
-
/* @__PURE__ */
|
|
3736
|
-
config.allowList.length > 0 ? /* @__PURE__ */
|
|
3737
|
-
/* @__PURE__ */
|
|
3738
|
-
/* @__PURE__ */
|
|
4014
|
+
/* @__PURE__ */ jsxs24("div", { children: [
|
|
4015
|
+
/* @__PURE__ */ jsx27("h4", { className: "text-xs font-medium text-muted-foreground mb-2 uppercase tracking-wider", children: "Allowlist (CIDR)" }),
|
|
4016
|
+
config.allowList.length > 0 ? /* @__PURE__ */ jsx27("div", { className: "space-y-1.5 mb-3", children: config.allowList.map((cidr) => /* @__PURE__ */ jsxs24("div", { className: "flex items-center justify-between rounded border border-[var(--md3-outline-variant)] bg-surface-container-high px-3 py-2", children: [
|
|
4017
|
+
/* @__PURE__ */ jsx27("span", { className: "font-mono text-xs text-foreground", children: cidr }),
|
|
4018
|
+
/* @__PURE__ */ jsx27(
|
|
3739
4019
|
"button",
|
|
3740
4020
|
{
|
|
3741
4021
|
type: "button",
|
|
3742
4022
|
onClick: () => handleRemoveCidr(cidr),
|
|
3743
4023
|
className: "p-1 text-muted-foreground hover:text-destructive transition-colors rounded",
|
|
3744
|
-
children: /* @__PURE__ */
|
|
4024
|
+
children: /* @__PURE__ */ jsx27(Trash24, { className: "h-3 w-3" })
|
|
3745
4025
|
}
|
|
3746
4026
|
)
|
|
3747
|
-
] }, cidr)) }) : /* @__PURE__ */
|
|
3748
|
-
/* @__PURE__ */
|
|
3749
|
-
/* @__PURE__ */
|
|
4027
|
+
] }, cidr)) }) : /* @__PURE__ */ jsx27("p", { className: "text-xs text-muted-foreground mb-3", children: "No CIDR rules configured. All traffic is allowed." }),
|
|
4028
|
+
/* @__PURE__ */ jsxs24("div", { className: "flex items-center gap-3", children: [
|
|
4029
|
+
/* @__PURE__ */ jsx27(
|
|
3750
4030
|
"input",
|
|
3751
4031
|
{
|
|
3752
4032
|
type: "text",
|
|
@@ -3757,7 +4037,7 @@ function NetworkConfig({ config, onUpdate, loading = false, className }) {
|
|
|
3757
4037
|
className: "flex-1 rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container-low px-3 py-2 text-sm font-mono text-foreground placeholder:text-muted-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
3758
4038
|
}
|
|
3759
4039
|
),
|
|
3760
|
-
/* @__PURE__ */
|
|
4040
|
+
/* @__PURE__ */ jsxs24(
|
|
3761
4041
|
"button",
|
|
3762
4042
|
{
|
|
3763
4043
|
type: "button",
|
|
@@ -3765,7 +4045,7 @@ function NetworkConfig({ config, onUpdate, loading = false, className }) {
|
|
|
3765
4045
|
disabled: !newCidr.trim(),
|
|
3766
4046
|
className: "inline-flex items-center gap-2 rounded-lg bg-primary/20 border border-primary/30 px-4 py-2 text-sm font-medium text-primary hover:bg-primary hover:text-primary-foreground transition-colors disabled:opacity-50",
|
|
3767
4047
|
children: [
|
|
3768
|
-
/* @__PURE__ */
|
|
4048
|
+
/* @__PURE__ */ jsx27(Plus6, { className: "h-4 w-4" }),
|
|
3769
4049
|
"Add"
|
|
3770
4050
|
]
|
|
3771
4051
|
}
|
|
@@ -3777,8 +4057,8 @@ function NetworkConfig({ config, onUpdate, loading = false, className }) {
|
|
|
3777
4057
|
|
|
3778
4058
|
// src/dashboard/backend-config.tsx
|
|
3779
4059
|
import * as React16 from "react";
|
|
3780
|
-
import { Bot, Plus as Plus7, Trash2 as Trash25, Server, Wrench } from "lucide-react";
|
|
3781
|
-
import { Fragment as Fragment14, jsx as
|
|
4060
|
+
import { Bot as Bot2, Plus as Plus7, Trash2 as Trash25, Server, Wrench } from "lucide-react";
|
|
4061
|
+
import { Fragment as Fragment14, jsx as jsx28, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3782
4062
|
function BackendConfig({
|
|
3783
4063
|
status,
|
|
3784
4064
|
mcpServers,
|
|
@@ -3808,16 +4088,16 @@ function BackendConfig({
|
|
|
3808
4088
|
}
|
|
3809
4089
|
};
|
|
3810
4090
|
if (loading || !status) {
|
|
3811
|
-
return /* @__PURE__ */
|
|
3812
|
-
/* @__PURE__ */
|
|
3813
|
-
/* @__PURE__ */
|
|
4091
|
+
return /* @__PURE__ */ jsxs25("div", { className: cn("rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container p-6 text-center", className), children: [
|
|
4092
|
+
/* @__PURE__ */ jsx28(Bot2, { className: "mx-auto h-6 w-6 text-muted-foreground animate-pulse mb-2" }),
|
|
4093
|
+
/* @__PURE__ */ jsx28("p", { className: "text-sm text-muted-foreground", children: "Loading backend status..." })
|
|
3814
4094
|
] });
|
|
3815
4095
|
}
|
|
3816
|
-
return /* @__PURE__ */
|
|
3817
|
-
/* @__PURE__ */
|
|
3818
|
-
/* @__PURE__ */
|
|
3819
|
-
/* @__PURE__ */
|
|
3820
|
-
onRestart ? /* @__PURE__ */
|
|
4096
|
+
return /* @__PURE__ */ jsxs25("div", { className: cn("space-y-4", className), children: [
|
|
4097
|
+
/* @__PURE__ */ jsxs25("div", { className: "rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container overflow-hidden", children: [
|
|
4098
|
+
/* @__PURE__ */ jsxs25("div", { className: "px-4 py-3 border-b border-[var(--md3-outline-variant)] bg-surface-container-high flex items-center justify-between", children: [
|
|
4099
|
+
/* @__PURE__ */ jsx28("h4", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider", children: "Agent Status" }),
|
|
4100
|
+
onRestart ? /* @__PURE__ */ jsx28(
|
|
3821
4101
|
"button",
|
|
3822
4102
|
{
|
|
3823
4103
|
type: "button",
|
|
@@ -3827,69 +4107,69 @@ function BackendConfig({
|
|
|
3827
4107
|
}
|
|
3828
4108
|
) : null
|
|
3829
4109
|
] }),
|
|
3830
|
-
/* @__PURE__ */
|
|
3831
|
-
/* @__PURE__ */
|
|
3832
|
-
/* @__PURE__ */
|
|
4110
|
+
/* @__PURE__ */ jsx28("div", { className: "p-4", children: /* @__PURE__ */ jsxs25("dl", { className: "grid grid-cols-[100px_1fr] gap-y-3 text-sm", children: [
|
|
4111
|
+
/* @__PURE__ */ jsx28("dt", { className: "text-muted-foreground", children: "Status" }),
|
|
4112
|
+
/* @__PURE__ */ jsx28("dd", { children: /* @__PURE__ */ jsx28("span", { className: cn(
|
|
3833
4113
|
"inline-flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10px] font-bold uppercase tracking-wider",
|
|
3834
4114
|
status.running ? "bg-[var(--surface-success-bg)] text-[var(--surface-success-text)]" : "bg-destructive/10 text-destructive"
|
|
3835
4115
|
), children: status.running ? "Running" : "Stopped" }) }),
|
|
3836
|
-
/* @__PURE__ */
|
|
3837
|
-
/* @__PURE__ */
|
|
3838
|
-
status.provider && /* @__PURE__ */
|
|
3839
|
-
/* @__PURE__ */
|
|
3840
|
-
/* @__PURE__ */
|
|
4116
|
+
/* @__PURE__ */ jsx28("dt", { className: "text-muted-foreground", children: "Model" }),
|
|
4117
|
+
/* @__PURE__ */ jsx28("dd", { className: "font-mono text-xs", children: status.model ?? "Default" }),
|
|
4118
|
+
status.provider && /* @__PURE__ */ jsxs25(Fragment14, { children: [
|
|
4119
|
+
/* @__PURE__ */ jsx28("dt", { className: "text-muted-foreground", children: "Provider" }),
|
|
4120
|
+
/* @__PURE__ */ jsx28("dd", { className: "font-mono text-xs", children: status.provider })
|
|
3841
4121
|
] })
|
|
3842
4122
|
] }) })
|
|
3843
4123
|
] }),
|
|
3844
|
-
/* @__PURE__ */
|
|
3845
|
-
/* @__PURE__ */
|
|
3846
|
-
/* @__PURE__ */
|
|
3847
|
-
/* @__PURE__ */
|
|
4124
|
+
/* @__PURE__ */ jsxs25("div", { className: "rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container overflow-hidden", children: [
|
|
4125
|
+
/* @__PURE__ */ jsxs25("div", { className: "px-4 py-3 border-b border-[var(--md3-outline-variant)] bg-surface-container-high flex items-center justify-between", children: [
|
|
4126
|
+
/* @__PURE__ */ jsxs25("h4", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wider flex items-center gap-2", children: [
|
|
4127
|
+
/* @__PURE__ */ jsx28(Wrench, { className: "h-3.5 w-3.5" }),
|
|
3848
4128
|
"MCP Servers"
|
|
3849
4129
|
] }),
|
|
3850
|
-
/* @__PURE__ */
|
|
4130
|
+
/* @__PURE__ */ jsxs25(
|
|
3851
4131
|
"button",
|
|
3852
4132
|
{
|
|
3853
4133
|
type: "button",
|
|
3854
4134
|
onClick: () => setShowAddMcp(!showAddMcp),
|
|
3855
4135
|
className: "inline-flex items-center gap-1.5 rounded-md bg-primary/20 border border-primary/30 px-2.5 py-1 text-xs font-medium text-primary hover:bg-primary hover:text-primary-foreground transition-colors",
|
|
3856
4136
|
children: [
|
|
3857
|
-
/* @__PURE__ */
|
|
4137
|
+
/* @__PURE__ */ jsx28(Plus7, { className: "h-3 w-3" }),
|
|
3858
4138
|
"Add"
|
|
3859
4139
|
]
|
|
3860
4140
|
}
|
|
3861
4141
|
)
|
|
3862
4142
|
] }),
|
|
3863
|
-
mcpServers.length > 0 ? /* @__PURE__ */
|
|
3864
|
-
/* @__PURE__ */
|
|
3865
|
-
/* @__PURE__ */
|
|
3866
|
-
/* @__PURE__ */
|
|
3867
|
-
/* @__PURE__ */
|
|
3868
|
-
/* @__PURE__ */
|
|
4143
|
+
mcpServers.length > 0 ? /* @__PURE__ */ jsx28("div", { className: "divide-y divide-border", children: mcpServers.map((s) => /* @__PURE__ */ jsxs25("div", { className: "flex items-center justify-between px-4 py-3", children: [
|
|
4144
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-3 min-w-0", children: [
|
|
4145
|
+
/* @__PURE__ */ jsx28(Server, { className: "h-3.5 w-3.5 text-muted-foreground shrink-0" }),
|
|
4146
|
+
/* @__PURE__ */ jsxs25("div", { className: "min-w-0", children: [
|
|
4147
|
+
/* @__PURE__ */ jsx28("p", { className: "text-sm font-medium text-foreground truncate", children: s.name }),
|
|
4148
|
+
/* @__PURE__ */ jsxs25("p", { className: "text-xs font-mono text-muted-foreground truncate", children: [
|
|
3869
4149
|
s.command,
|
|
3870
4150
|
" ",
|
|
3871
4151
|
s.args?.join(" ") ?? ""
|
|
3872
4152
|
] })
|
|
3873
4153
|
] })
|
|
3874
4154
|
] }),
|
|
3875
|
-
/* @__PURE__ */
|
|
3876
|
-
s.status && /* @__PURE__ */
|
|
4155
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex items-center gap-2 shrink-0", children: [
|
|
4156
|
+
s.status && /* @__PURE__ */ jsx28("span", { className: cn(
|
|
3877
4157
|
"inline-flex items-center rounded-full px-1.5 py-0.5 text-[9px] font-bold uppercase",
|
|
3878
4158
|
s.status === "running" ? "bg-[var(--surface-success-bg)] text-[var(--surface-success-text)]" : s.status === "error" ? "bg-destructive/10 text-destructive" : "bg-surface-container-high text-muted-foreground"
|
|
3879
4159
|
), children: s.status }),
|
|
3880
|
-
/* @__PURE__ */
|
|
4160
|
+
/* @__PURE__ */ jsx28(
|
|
3881
4161
|
"button",
|
|
3882
4162
|
{
|
|
3883
4163
|
type: "button",
|
|
3884
4164
|
onClick: () => onRemoveMcp(s.name),
|
|
3885
4165
|
className: "p-1 text-muted-foreground hover:text-destructive transition-colors rounded",
|
|
3886
|
-
children: /* @__PURE__ */
|
|
4166
|
+
children: /* @__PURE__ */ jsx28(Trash25, { className: "h-3.5 w-3.5" })
|
|
3887
4167
|
}
|
|
3888
4168
|
)
|
|
3889
4169
|
] })
|
|
3890
|
-
] }, s.name)) }) : /* @__PURE__ */
|
|
3891
|
-
showAddMcp && /* @__PURE__ */
|
|
3892
|
-
/* @__PURE__ */
|
|
4170
|
+
] }, s.name)) }) : /* @__PURE__ */ jsx28("div", { className: "p-4 text-center", children: /* @__PURE__ */ jsx28("p", { className: "text-xs text-muted-foreground", children: "No MCP servers configured" }) }),
|
|
4171
|
+
showAddMcp && /* @__PURE__ */ jsxs25("div", { className: "p-4 border-t border-[var(--md3-outline-variant)] bg-surface-container-high space-y-2", children: [
|
|
4172
|
+
/* @__PURE__ */ jsx28(
|
|
3893
4173
|
"input",
|
|
3894
4174
|
{
|
|
3895
4175
|
type: "text",
|
|
@@ -3899,7 +4179,7 @@ function BackendConfig({
|
|
|
3899
4179
|
className: "w-full rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container-low px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
3900
4180
|
}
|
|
3901
4181
|
),
|
|
3902
|
-
/* @__PURE__ */
|
|
4182
|
+
/* @__PURE__ */ jsx28(
|
|
3903
4183
|
"input",
|
|
3904
4184
|
{
|
|
3905
4185
|
type: "text",
|
|
@@ -3909,7 +4189,7 @@ function BackendConfig({
|
|
|
3909
4189
|
className: "w-full rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container-low px-3 py-2 text-sm font-mono text-foreground placeholder:text-muted-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
3910
4190
|
}
|
|
3911
4191
|
),
|
|
3912
|
-
/* @__PURE__ */
|
|
4192
|
+
/* @__PURE__ */ jsx28(
|
|
3913
4193
|
"input",
|
|
3914
4194
|
{
|
|
3915
4195
|
type: "text",
|
|
@@ -3919,8 +4199,8 @@ function BackendConfig({
|
|
|
3919
4199
|
className: "w-full rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container-low px-3 py-2 text-sm font-mono text-foreground placeholder:text-muted-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
3920
4200
|
}
|
|
3921
4201
|
),
|
|
3922
|
-
/* @__PURE__ */
|
|
3923
|
-
/* @__PURE__ */
|
|
4202
|
+
/* @__PURE__ */ jsxs25("div", { className: "flex justify-end gap-2 pt-1", children: [
|
|
4203
|
+
/* @__PURE__ */ jsx28(
|
|
3924
4204
|
"button",
|
|
3925
4205
|
{
|
|
3926
4206
|
type: "button",
|
|
@@ -3929,7 +4209,7 @@ function BackendConfig({
|
|
|
3929
4209
|
children: "Cancel"
|
|
3930
4210
|
}
|
|
3931
4211
|
),
|
|
3932
|
-
/* @__PURE__ */
|
|
4212
|
+
/* @__PURE__ */ jsx28(
|
|
3933
4213
|
"button",
|
|
3934
4214
|
{
|
|
3935
4215
|
type: "button",
|
|
@@ -3948,7 +4228,7 @@ function BackendConfig({
|
|
|
3948
4228
|
// src/dashboard/snapshot-list.tsx
|
|
3949
4229
|
import * as React17 from "react";
|
|
3950
4230
|
import { Camera, Clock as Clock5, HardDrive as HardDrive2, Plus as Plus8, RotateCcw } from "lucide-react";
|
|
3951
|
-
import { jsx as
|
|
4231
|
+
import { jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3952
4232
|
function formatBytes(bytes) {
|
|
3953
4233
|
if (bytes == null || bytes < 0) return "-";
|
|
3954
4234
|
if (bytes === 0) return "0 B";
|
|
@@ -3971,25 +4251,25 @@ function SnapshotList({ snapshots, onCreate, onRestore, onSaveAsTemplate, loadin
|
|
|
3971
4251
|
setTags("");
|
|
3972
4252
|
setShowCreate(false);
|
|
3973
4253
|
};
|
|
3974
|
-
return /* @__PURE__ */
|
|
3975
|
-
/* @__PURE__ */
|
|
3976
|
-
/* @__PURE__ */
|
|
3977
|
-
/* @__PURE__ */
|
|
4254
|
+
return /* @__PURE__ */ jsxs26("div", { className: cn("space-y-4", className), children: [
|
|
4255
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-between", children: [
|
|
4256
|
+
/* @__PURE__ */ jsx29("h3", { className: "text-sm font-bold text-foreground", children: "Snapshots" }),
|
|
4257
|
+
/* @__PURE__ */ jsxs26(
|
|
3978
4258
|
"button",
|
|
3979
4259
|
{
|
|
3980
4260
|
type: "button",
|
|
3981
4261
|
onClick: () => setShowCreate(!showCreate),
|
|
3982
4262
|
className: "inline-flex items-center gap-1.5 rounded-lg bg-primary/20 border border-primary/30 px-3 py-1.5 text-xs font-medium text-primary hover:bg-primary hover:text-primary-foreground transition-colors",
|
|
3983
4263
|
children: [
|
|
3984
|
-
/* @__PURE__ */
|
|
4264
|
+
/* @__PURE__ */ jsx29(Plus8, { className: "h-3.5 w-3.5" }),
|
|
3985
4265
|
"Create Snapshot"
|
|
3986
4266
|
]
|
|
3987
4267
|
}
|
|
3988
4268
|
)
|
|
3989
4269
|
] }),
|
|
3990
|
-
showCreate && /* @__PURE__ */
|
|
3991
|
-
/* @__PURE__ */
|
|
3992
|
-
/* @__PURE__ */
|
|
4270
|
+
showCreate && /* @__PURE__ */ jsxs26("div", { className: "rounded-lg border border-primary/20 bg-primary/5 p-4 space-y-3", children: [
|
|
4271
|
+
/* @__PURE__ */ jsx29("p", { className: "text-sm text-foreground font-medium", children: "Create a new snapshot of the current sandbox state." }),
|
|
4272
|
+
/* @__PURE__ */ jsx29(
|
|
3993
4273
|
"input",
|
|
3994
4274
|
{
|
|
3995
4275
|
type: "text",
|
|
@@ -4000,8 +4280,8 @@ function SnapshotList({ snapshots, onCreate, onRestore, onSaveAsTemplate, loadin
|
|
|
4000
4280
|
className: "w-full rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container-low px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-ring"
|
|
4001
4281
|
}
|
|
4002
4282
|
),
|
|
4003
|
-
/* @__PURE__ */
|
|
4004
|
-
/* @__PURE__ */
|
|
4283
|
+
/* @__PURE__ */ jsxs26("div", { className: "flex justify-end gap-2", children: [
|
|
4284
|
+
/* @__PURE__ */ jsx29(
|
|
4005
4285
|
"button",
|
|
4006
4286
|
{
|
|
4007
4287
|
type: "button",
|
|
@@ -4010,44 +4290,44 @@ function SnapshotList({ snapshots, onCreate, onRestore, onSaveAsTemplate, loadin
|
|
|
4010
4290
|
children: "Cancel"
|
|
4011
4291
|
}
|
|
4012
4292
|
),
|
|
4013
|
-
/* @__PURE__ */
|
|
4293
|
+
/* @__PURE__ */ jsxs26(
|
|
4014
4294
|
"button",
|
|
4015
4295
|
{
|
|
4016
4296
|
type: "button",
|
|
4017
4297
|
onClick: handleCreate,
|
|
4018
4298
|
className: "rounded-md bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 transition-colors",
|
|
4019
4299
|
children: [
|
|
4020
|
-
/* @__PURE__ */
|
|
4300
|
+
/* @__PURE__ */ jsx29(Camera, { className: "h-3 w-3 mr-1.5 inline" }),
|
|
4021
4301
|
"Create"
|
|
4022
4302
|
]
|
|
4023
4303
|
}
|
|
4024
4304
|
)
|
|
4025
4305
|
] })
|
|
4026
4306
|
] }),
|
|
4027
|
-
loading ? /* @__PURE__ */
|
|
4028
|
-
/* @__PURE__ */
|
|
4029
|
-
/* @__PURE__ */
|
|
4030
|
-
] }) : snapshots.length > 0 ? /* @__PURE__ */
|
|
4031
|
-
/* @__PURE__ */
|
|
4032
|
-
/* @__PURE__ */
|
|
4033
|
-
/* @__PURE__ */
|
|
4034
|
-
/* @__PURE__ */
|
|
4035
|
-
/* @__PURE__ */
|
|
4036
|
-
/* @__PURE__ */
|
|
4307
|
+
loading ? /* @__PURE__ */ jsxs26("div", { className: "rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container p-6 text-center", children: [
|
|
4308
|
+
/* @__PURE__ */ jsx29(Camera, { className: "mx-auto h-6 w-6 text-muted-foreground animate-pulse mb-2" }),
|
|
4309
|
+
/* @__PURE__ */ jsx29("p", { className: "text-sm text-muted-foreground", children: "Loading snapshots..." })
|
|
4310
|
+
] }) : snapshots.length > 0 ? /* @__PURE__ */ jsx29("div", { className: "rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container overflow-hidden", children: /* @__PURE__ */ jsxs26("table", { className: "w-full text-sm", children: [
|
|
4311
|
+
/* @__PURE__ */ jsx29("thead", { className: "bg-surface-container-high border-b border-[var(--md3-outline-variant)]", children: /* @__PURE__ */ jsxs26("tr", { children: [
|
|
4312
|
+
/* @__PURE__ */ jsx29("th", { className: "px-4 py-2.5 text-left text-xs font-medium text-muted-foreground", children: "ID" }),
|
|
4313
|
+
/* @__PURE__ */ jsx29("th", { className: "px-4 py-2.5 text-left text-xs font-medium text-muted-foreground", children: "Created" }),
|
|
4314
|
+
/* @__PURE__ */ jsx29("th", { className: "px-4 py-2.5 text-left text-xs font-medium text-muted-foreground", children: "Size" }),
|
|
4315
|
+
/* @__PURE__ */ jsx29("th", { className: "px-4 py-2.5 text-left text-xs font-medium text-muted-foreground", children: "Tags" }),
|
|
4316
|
+
/* @__PURE__ */ jsx29("th", { className: "px-4 py-2.5 text-right text-xs font-medium text-muted-foreground w-24" })
|
|
4037
4317
|
] }) }),
|
|
4038
|
-
/* @__PURE__ */
|
|
4039
|
-
/* @__PURE__ */
|
|
4040
|
-
/* @__PURE__ */
|
|
4041
|
-
/* @__PURE__ */
|
|
4318
|
+
/* @__PURE__ */ jsx29("tbody", { className: "divide-y divide-border", children: snapshots.map((s) => /* @__PURE__ */ jsxs26("tr", { children: [
|
|
4319
|
+
/* @__PURE__ */ jsx29("td", { className: "px-4 py-3 font-mono text-xs text-foreground", children: s.id.slice(0, 12) }),
|
|
4320
|
+
/* @__PURE__ */ jsx29("td", { className: "px-4 py-3 text-xs text-muted-foreground", children: /* @__PURE__ */ jsxs26("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
4321
|
+
/* @__PURE__ */ jsx29(Clock5, { className: "h-3 w-3" }),
|
|
4042
4322
|
formatDate(s.createdAt)
|
|
4043
4323
|
] }) }),
|
|
4044
|
-
/* @__PURE__ */
|
|
4045
|
-
/* @__PURE__ */
|
|
4324
|
+
/* @__PURE__ */ jsx29("td", { className: "px-4 py-3 text-xs text-muted-foreground", children: /* @__PURE__ */ jsxs26("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
4325
|
+
/* @__PURE__ */ jsx29(HardDrive2, { className: "h-3 w-3" }),
|
|
4046
4326
|
formatBytes(s.sizeBytes)
|
|
4047
4327
|
] }) }),
|
|
4048
|
-
/* @__PURE__ */
|
|
4049
|
-
/* @__PURE__ */
|
|
4050
|
-
/* @__PURE__ */
|
|
4328
|
+
/* @__PURE__ */ jsx29("td", { className: "px-4 py-3", children: s.tags?.length ? /* @__PURE__ */ jsx29("div", { className: "flex items-center gap-1 flex-wrap", children: s.tags.map((tag) => /* @__PURE__ */ jsx29("span", { className: "rounded-full bg-surface-container-high px-2 py-0.5 text-[10px] font-medium text-muted-foreground border border-[var(--md3-outline-variant)]", children: tag }, tag)) }) : /* @__PURE__ */ jsx29("span", { className: "text-xs text-muted-foreground", children: "-" }) }),
|
|
4329
|
+
/* @__PURE__ */ jsx29("td", { className: "px-4 py-3 text-right", children: /* @__PURE__ */ jsxs26("div", { className: "flex items-center justify-end gap-2", children: [
|
|
4330
|
+
/* @__PURE__ */ jsxs26(
|
|
4051
4331
|
"button",
|
|
4052
4332
|
{
|
|
4053
4333
|
type: "button",
|
|
@@ -4055,12 +4335,12 @@ function SnapshotList({ snapshots, onCreate, onRestore, onSaveAsTemplate, loadin
|
|
|
4055
4335
|
className: "inline-flex items-center gap-1.5 rounded-md bg-surface-container-high px-2.5 py-1 text-xs font-medium text-foreground hover:bg-surface-container-highest transition-colors border border-[var(--md3-outline-variant)]",
|
|
4056
4336
|
title: "Restore to new sandbox",
|
|
4057
4337
|
children: [
|
|
4058
|
-
/* @__PURE__ */
|
|
4338
|
+
/* @__PURE__ */ jsx29(RotateCcw, { className: "h-3 w-3" }),
|
|
4059
4339
|
"Restore"
|
|
4060
4340
|
]
|
|
4061
4341
|
}
|
|
4062
4342
|
),
|
|
4063
|
-
onSaveAsTemplate && /* @__PURE__ */
|
|
4343
|
+
onSaveAsTemplate && /* @__PURE__ */ jsx29(
|
|
4064
4344
|
"button",
|
|
4065
4345
|
{
|
|
4066
4346
|
type: "button",
|
|
@@ -4072,16 +4352,16 @@ function SnapshotList({ snapshots, onCreate, onRestore, onSaveAsTemplate, loadin
|
|
|
4072
4352
|
)
|
|
4073
4353
|
] }) })
|
|
4074
4354
|
] }, s.id)) })
|
|
4075
|
-
] }) }) : /* @__PURE__ */
|
|
4076
|
-
/* @__PURE__ */
|
|
4077
|
-
/* @__PURE__ */
|
|
4078
|
-
/* @__PURE__ */
|
|
4355
|
+
] }) }) : /* @__PURE__ */ jsxs26("div", { className: "rounded-lg border border-[var(--md3-outline-variant)] bg-surface-container p-6 text-center", children: [
|
|
4356
|
+
/* @__PURE__ */ jsx29(Camera, { className: "mx-auto h-8 w-8 text-muted-foreground mb-2" }),
|
|
4357
|
+
/* @__PURE__ */ jsx29("p", { className: "text-sm text-muted-foreground", children: "No snapshots yet" }),
|
|
4358
|
+
/* @__PURE__ */ jsx29("p", { className: "text-xs text-muted-foreground mt-1", children: "Create a snapshot to save the current state of your sandbox." })
|
|
4079
4359
|
] })
|
|
4080
4360
|
] });
|
|
4081
4361
|
}
|
|
4082
4362
|
|
|
4083
4363
|
// src/dashboard/promo-banner.tsx
|
|
4084
|
-
import { Fragment as Fragment15, jsx as
|
|
4364
|
+
import { Fragment as Fragment15, jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4085
4365
|
function PromoBanner({
|
|
4086
4366
|
title,
|
|
4087
4367
|
description,
|
|
@@ -4096,21 +4376,21 @@ function PromoBanner({
|
|
|
4096
4376
|
"mt-6 inline-flex items-center gap-2 rounded-md border border-white/20 bg-[var(--btn-primary-bg)] px-4 py-2 text-sm font-medium text-[var(--btn-primary-text)] transition-colors",
|
|
4097
4377
|
disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-[var(--btn-primary-hover)]"
|
|
4098
4378
|
);
|
|
4099
|
-
const buttonContent = /* @__PURE__ */
|
|
4379
|
+
const buttonContent = /* @__PURE__ */ jsxs27(Fragment15, { children: [
|
|
4100
4380
|
buttonLabel,
|
|
4101
|
-
/* @__PURE__ */
|
|
4102
|
-
/* @__PURE__ */
|
|
4103
|
-
/* @__PURE__ */
|
|
4381
|
+
/* @__PURE__ */ jsxs27("svg", { "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "h-4 w-4", children: [
|
|
4382
|
+
/* @__PURE__ */ jsx30("path", { d: "M5 12h14" }),
|
|
4383
|
+
/* @__PURE__ */ jsx30("path", { d: "m12 5 7 7-7 7" })
|
|
4104
4384
|
] })
|
|
4105
4385
|
] });
|
|
4106
|
-
return /* @__PURE__ */
|
|
4107
|
-
/* @__PURE__ */
|
|
4108
|
-
/* @__PURE__ */
|
|
4109
|
-
/* @__PURE__ */
|
|
4110
|
-
href && !disabled ? /* @__PURE__ */
|
|
4386
|
+
return /* @__PURE__ */ jsxs27("div", { className: cn("relative overflow-hidden rounded-xl bg-[var(--brand-strong)] p-8 md:flex md:items-center md:justify-between", className), children: [
|
|
4387
|
+
/* @__PURE__ */ jsxs27("div", { className: "relative z-10", children: [
|
|
4388
|
+
/* @__PURE__ */ jsx30("h3", { className: "text-xl font-bold text-[var(--brand-strong-text)]", children: title }),
|
|
4389
|
+
/* @__PURE__ */ jsx30("p", { className: "mt-2 max-w-md text-sm text-[var(--brand-strong-text-muted)]", children: description }),
|
|
4390
|
+
href && !disabled ? /* @__PURE__ */ jsx30("a", { href, target: "_blank", rel: "noopener noreferrer", onClick, className: buttonClasses, children: buttonContent }) : /* @__PURE__ */ jsx30("button", { type: "button", onClick, disabled, className: buttonClasses, children: buttonContent })
|
|
4111
4391
|
] }),
|
|
4112
|
-
icon && /* @__PURE__ */
|
|
4113
|
-
/* @__PURE__ */
|
|
4392
|
+
icon && /* @__PURE__ */ jsx30("div", { className: "relative z-10 mt-6 flex items-center md:mt-0", children: /* @__PURE__ */ jsx30("div", { className: "flex h-16 w-16 items-center justify-center rounded-2xl border border-white/10 bg-white/10", children: icon }) }),
|
|
4393
|
+
/* @__PURE__ */ jsx30("div", { className: "pointer-events-none absolute inset-y-0 right-0 w-1/3 bg-gradient-to-l from-white/5 to-transparent" })
|
|
4114
4394
|
] });
|
|
4115
4395
|
}
|
|
4116
4396
|
|
|
@@ -4155,6 +4435,12 @@ export {
|
|
|
4155
4435
|
SandboxTable,
|
|
4156
4436
|
InvoiceTable,
|
|
4157
4437
|
PlanCards,
|
|
4438
|
+
BackendSelector,
|
|
4439
|
+
HARNESS_BRAND,
|
|
4440
|
+
HarnessLogo,
|
|
4441
|
+
HARNESS_OPTIONS,
|
|
4442
|
+
chatCapableHarnesses,
|
|
4443
|
+
HarnessPicker,
|
|
4158
4444
|
DashboardLayout,
|
|
4159
4445
|
SidebarLayout,
|
|
4160
4446
|
ProfileSelector,
|