@tangle-network/sandbox-ui 0.4.0 → 0.5.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/auth.js +3 -3
- package/dist/chat.d.ts +1 -1
- package/dist/chat.js +11 -9
- package/dist/{chunk-ZP6GSX4D.js → chunk-565V6JTN.js} +26 -50
- package/dist/chunk-5CEMHKBP.js +72 -0
- package/dist/{chunk-FOQTE67I.js → chunk-5F4NX5R2.js} +10 -5
- package/dist/{chunk-MUOL44AE.js → chunk-BRBTD7RH.js} +6 -6
- package/dist/{chunk-SSKVYXCR.js → chunk-DCPYTL4W.js} +62 -79
- package/dist/chunk-DLCFZDGX.js +182 -0
- package/dist/{chunk-HXEA7L2T.js → chunk-FFOXUHOF.js} +10 -10
- package/dist/chunk-H5XYSFYE.js +228 -0
- package/dist/{chunk-TQN3VR4F.js → chunk-JP725R4W.js} +2 -2
- package/dist/{chunk-CJ2RYVZH.js → chunk-NTSRY4GW.js} +68 -10
- package/dist/{chunk-DQYODCBN.js → chunk-P24K22CV.js} +57 -66
- package/dist/{chunk-GVUW4VDD.js → chunk-R3IU37AW.js} +161 -229
- package/dist/chunk-TDYQBLL5.js +127 -0
- package/dist/{chunk-HWLX5NME.js → chunk-TSE423UF.js} +12 -12
- package/dist/{chunk-YDBXQQLC.js → chunk-VBWY44UU.js} +30 -76
- package/dist/{chunk-IW2JZCOC.js → chunk-WBQ7VULC.js} +7 -7
- package/dist/{chunk-72UEKFZ2.js → chunk-WC7QTWPN.js} +65 -42
- package/dist/{chunk-HYLTXGOI.js → chunk-WQH233GF.js} +5 -5
- package/dist/{chunk-CCKNIAS7.js → chunk-XBR3IP7B.js} +2 -2
- package/dist/{chunk-OHMO7NUX.js → chunk-XTPAWK7L.js} +20 -31
- package/dist/{chunk-SULQQJPB.js → chunk-YS66Q3RC.js} +1 -1
- package/dist/{chunk-FRGMMANX.js → chunk-YYGECNZZ.js} +3 -3
- package/dist/{chunk-MVYFNPAH.js → chunk-ZOZX2U6I.js} +285 -271
- package/dist/dashboard.d.ts +2 -2
- package/dist/dashboard.js +6 -6
- package/dist/{document-editor-pane-5TN2VWGZ.js → document-editor-pane-JNXPANWM.js} +2 -2
- package/dist/editor.js +2 -2
- package/dist/files.js +2 -2
- package/dist/globals.css +129 -95
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +5 -5
- package/dist/{index-tTfThG0n.d.ts → index-CDt0GE4A.d.ts} +7 -8
- package/dist/index.d.ts +16 -23
- package/dist/index.js +27 -26
- package/dist/markdown.d.ts +14 -17
- package/dist/markdown.js +1 -1
- package/dist/openui.js +5 -5
- package/dist/pages.d.ts +10 -3
- package/dist/pages.js +147 -184
- package/dist/primitives.d.ts +8 -5
- package/dist/primitives.js +8 -8
- package/dist/run.d.ts +1 -1
- package/dist/run.js +4 -4
- package/dist/sdk-hooks.d.ts +1 -1
- package/dist/sdk-hooks.js +4 -4
- package/dist/styles.css +129 -95
- package/dist/terminal.d.ts +2 -2
- package/dist/terminal.js +13 -43
- package/dist/tokens.css +299 -179
- package/dist/{tool-call-feed-D5Ume-Pt.d.ts → tool-call-feed-Bs3MyQMT.d.ts} +3 -1
- package/dist/{usage-chart-CY9xo3KX.d.ts → usage-chart-XCoB_7Xu.d.ts} +1 -2
- package/dist/{use-pty-session-DeZSxOCN.d.ts → use-pty-session-COzVkhtc.d.ts} +1 -1
- package/dist/workspace.d.ts +3 -1
- package/dist/workspace.js +11 -11
- package/package.json +14 -2
- package/dist/chunk-GRYHFH5O.js +0 -110
- package/dist/chunk-LTFK464G.js +0 -103
- package/dist/chunk-MXCSSOGH.js +0 -105
|
@@ -11,16 +11,16 @@ import {
|
|
|
11
11
|
DropdownMenuLabel,
|
|
12
12
|
DropdownMenuSeparator,
|
|
13
13
|
DropdownMenuTrigger
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-WBQ7VULC.js";
|
|
15
15
|
import {
|
|
16
16
|
Skeleton
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-YYGECNZZ.js";
|
|
18
18
|
import {
|
|
19
19
|
Badge
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-TDYQBLL5.js";
|
|
21
21
|
import {
|
|
22
22
|
Button
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-TSE423UF.js";
|
|
24
24
|
import {
|
|
25
25
|
cn
|
|
26
26
|
} from "./chunk-RQHJBTEU.js";
|
|
@@ -182,7 +182,7 @@ function SidebarRailFooter({ children, className }) {
|
|
|
182
182
|
function RailSeparator({ className }) {
|
|
183
183
|
return /* @__PURE__ */ jsx2("div", { className: cn("my-2 h-px w-10 bg-sidebar-border", className) });
|
|
184
184
|
}
|
|
185
|
-
function RailButton({ icon:
|
|
185
|
+
function RailButton({ icon: Icon2, label, isActive, badge, onClick, className }) {
|
|
186
186
|
return /* @__PURE__ */ jsxs(
|
|
187
187
|
"button",
|
|
188
188
|
{
|
|
@@ -199,7 +199,7 @@ function RailButton({ icon: Icon, label, isActive, badge, onClick, className })
|
|
|
199
199
|
className
|
|
200
200
|
),
|
|
201
201
|
children: [
|
|
202
|
-
/* @__PURE__ */ jsx2(
|
|
202
|
+
/* @__PURE__ */ jsx2(Icon2, { className: "h-5 w-5" }),
|
|
203
203
|
badge !== void 0 && badge > 0 && /* @__PURE__ */ jsx2("span", { className: "absolute -top-1 -right-1 flex h-4 min-w-4 items-center justify-center rounded-full bg-sidebar-primary text-[10px] font-medium text-white px-1", children: badge > 99 ? "99+" : badge })
|
|
204
204
|
]
|
|
205
205
|
}
|
|
@@ -282,7 +282,7 @@ function ProfileAvatar({
|
|
|
282
282
|
/* @__PURE__ */ jsx2(DropdownMenuLabel, { className: "p-0 font-normal", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 px-2 py-3", children: [
|
|
283
283
|
/* @__PURE__ */ jsxs(Avatar, { className: "h-12 w-12 shrink-0", children: [
|
|
284
284
|
user?.avatarUrl && /* @__PURE__ */ jsx2(AvatarImage, { src: user.avatarUrl, alt: "" }),
|
|
285
|
-
/* @__PURE__ */ jsx2(AvatarFallback, { className: "text-sm bg-violet-
|
|
285
|
+
/* @__PURE__ */ jsx2(AvatarFallback, { className: "text-sm bg-[var(--surface-violet-bg)] text-[var(--surface-violet-text)]", children: getInitials(user?.name, user?.email) })
|
|
286
286
|
] }),
|
|
287
287
|
/* @__PURE__ */ jsx2("div", { className: "min-w-0 flex-1", children: isLoading ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
288
288
|
/* @__PURE__ */ jsx2(Skeleton, { className: "h-4 w-24 mb-1" }),
|
|
@@ -307,7 +307,7 @@ function ProfileAvatar({
|
|
|
307
307
|
] }) }),
|
|
308
308
|
onLogout && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
309
309
|
/* @__PURE__ */ jsx2(DropdownMenuSeparator, {}),
|
|
310
|
-
/* @__PURE__ */ jsxs(DropdownMenuItem, { className: "text-
|
|
310
|
+
/* @__PURE__ */ jsxs(DropdownMenuItem, { className: "text-[var(--surface-danger-text)]", onClick: onLogout, children: [
|
|
311
311
|
/* @__PURE__ */ jsx2(LogOutIcon, { className: "mr-2 h-4 w-4", "aria-hidden": "true" }),
|
|
312
312
|
"Sign Out"
|
|
313
313
|
] })
|
|
@@ -318,37 +318,36 @@ function ProfileAvatar({
|
|
|
318
318
|
|
|
319
319
|
// src/dashboard/cluster-status-bar.tsx
|
|
320
320
|
import { jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
321
|
-
function MaterialIcon({ name, className }) {
|
|
322
|
-
return /* @__PURE__ */ jsx3("span", { className: cn("material-symbols-outlined", className), style: { fontVariationSettings: "'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24" }, children: name });
|
|
323
|
-
}
|
|
324
321
|
function ClusterStatusBar({ items, latency, className }) {
|
|
325
322
|
return /* @__PURE__ */ jsxs2(
|
|
326
323
|
"footer",
|
|
327
324
|
{
|
|
328
325
|
className: cn(
|
|
329
|
-
"fixed bottom-0 left-0 lg:left-64 right-0 h-
|
|
326
|
+
"fixed bottom-0 left-0 lg:left-64 right-0 h-9 bg-[var(--depth-1)] border-t border-[var(--border-subtle)] flex items-center justify-between px-6 z-30",
|
|
330
327
|
className
|
|
331
328
|
),
|
|
332
329
|
children: [
|
|
333
|
-
/* @__PURE__ */ jsx3("div", { className: "flex items-center gap-6 overflow-x-auto whitespace-nowrap", children: items.map((item, i) => /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-
|
|
334
|
-
/* @__PURE__ */ jsx3(
|
|
335
|
-
/* @__PURE__ */ jsxs2("span", { className: "text-[10px] font-mono text-
|
|
330
|
+
/* @__PURE__ */ jsx3("div", { className: "flex items-center gap-6 overflow-x-auto whitespace-nowrap", children: items.map((item, i) => /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-1.5", children: [
|
|
331
|
+
item.icon && /* @__PURE__ */ jsx3("span", { className: "text-[var(--text-muted)] [&_svg]:h-3 [&_svg]:w-3", children: item.icon }),
|
|
332
|
+
/* @__PURE__ */ jsxs2("span", { className: "text-[10px] font-mono text-[var(--text-muted)]", children: [
|
|
336
333
|
item.label,
|
|
337
|
-
":
|
|
338
|
-
|
|
334
|
+
":",
|
|
335
|
+
" ",
|
|
336
|
+
/* @__PURE__ */ jsx3("span", { className: cn("text-[var(--text-secondary)]", item.valueClass), children: item.value })
|
|
339
337
|
] })
|
|
340
338
|
] }, i)) }),
|
|
341
339
|
latency && /* @__PURE__ */ jsxs2("div", { className: "hidden sm:flex items-center gap-2", children: [
|
|
342
|
-
/* @__PURE__ */ jsxs2("span", { className: "text-[10px] font-mono text-
|
|
343
|
-
"
|
|
344
|
-
|
|
340
|
+
/* @__PURE__ */ jsxs2("span", { className: "text-[10px] font-mono text-[var(--text-muted)]", children: [
|
|
341
|
+
"Latency:",
|
|
342
|
+
" ",
|
|
343
|
+
/* @__PURE__ */ jsx3("span", { className: "text-[var(--text-secondary)]", children: latency })
|
|
345
344
|
] }),
|
|
346
345
|
/* @__PURE__ */ jsxs2("div", { className: "flex gap-0.5 h-3 items-end", children: [
|
|
347
|
-
/* @__PURE__ */ jsx3("div", { className: "w-0.5 h-1 bg-
|
|
348
|
-
/* @__PURE__ */ jsx3("div", { className: "w-0.5 h-2 bg-
|
|
349
|
-
/* @__PURE__ */ jsx3("div", { className: "w-0.5 h-1.5 bg-
|
|
350
|
-
/* @__PURE__ */ jsx3("div", { className: "w-0.5 h-3 bg-
|
|
351
|
-
/* @__PURE__ */ jsx3("div", { className: "w-0.5 h-2.5 bg-
|
|
346
|
+
/* @__PURE__ */ jsx3("div", { className: "w-0.5 h-1 bg-[var(--brand-cool)]" }),
|
|
347
|
+
/* @__PURE__ */ jsx3("div", { className: "w-0.5 h-2 bg-[var(--brand-cool)]" }),
|
|
348
|
+
/* @__PURE__ */ jsx3("div", { className: "w-0.5 h-1.5 bg-[var(--brand-cool)]" }),
|
|
349
|
+
/* @__PURE__ */ jsx3("div", { className: "w-0.5 h-3 bg-[var(--brand-cool)]" }),
|
|
350
|
+
/* @__PURE__ */ jsx3("div", { className: "w-0.5 h-2.5 bg-[var(--brand-cool)]" })
|
|
352
351
|
] })
|
|
353
352
|
] })
|
|
354
353
|
]
|
|
@@ -367,24 +366,24 @@ function CreditBalance({
|
|
|
367
366
|
className
|
|
368
367
|
}) {
|
|
369
368
|
const [topUpValue, setTopUpValue] = React2.useState("50.00");
|
|
370
|
-
return /* @__PURE__ */ jsxs3("div", { className: cn("bg-
|
|
369
|
+
return /* @__PURE__ */ jsxs3("div", { className: cn("bg-[var(--depth-2)] p-8 rounded-xl flex flex-col justify-between border border-[var(--border-subtle)]", className), children: [
|
|
371
370
|
/* @__PURE__ */ jsxs3("div", { children: [
|
|
372
|
-
/* @__PURE__ */ jsx4("h3", { className: "text-
|
|
373
|
-
/* @__PURE__ */ jsxs3("div", { className: "text-5xl font-extrabold text-
|
|
371
|
+
/* @__PURE__ */ jsx4("h3", { className: "text-sm font-semibold text-[var(--text-muted)] uppercase tracking-widest mb-2", children: "Available Credits" }),
|
|
372
|
+
/* @__PURE__ */ jsxs3("div", { className: "text-5xl font-extrabold text-[var(--brand-cool)] tracking-tighter mb-3", children: [
|
|
374
373
|
"$",
|
|
375
374
|
amount.toFixed(2)
|
|
376
375
|
] }),
|
|
377
|
-
/* @__PURE__ */ jsx4("p", { className: "text-sm text-
|
|
376
|
+
/* @__PURE__ */ jsx4("p", { className: "text-sm text-[var(--text-muted)] leading-relaxed", children: description })
|
|
378
377
|
] }),
|
|
379
|
-
onTopUp && /* @__PURE__ */ jsxs3("div", { className: "space-y-
|
|
380
|
-
/* @__PURE__ */ jsxs3("div", { className: "bg-
|
|
378
|
+
onTopUp && /* @__PURE__ */ jsxs3("div", { className: "space-y-3 mt-8", children: [
|
|
379
|
+
/* @__PURE__ */ jsxs3("div", { className: "bg-[var(--depth-1)] border border-[var(--border-subtle)] p-1 rounded-lg flex items-center", children: [
|
|
381
380
|
/* @__PURE__ */ jsx4(
|
|
382
381
|
"input",
|
|
383
382
|
{
|
|
384
383
|
type: "text",
|
|
385
384
|
value: `$${topUpValue}`,
|
|
386
385
|
onChange: (e) => setTopUpValue(e.target.value.replace(/[^0-9.]/g, "")),
|
|
387
|
-
className: "bg-transparent border-none text-
|
|
386
|
+
className: "bg-transparent border-none text-[var(--text-primary)] font-mono text-lg w-full focus:ring-0 px-4 outline-none"
|
|
388
387
|
}
|
|
389
388
|
),
|
|
390
389
|
/* @__PURE__ */ jsx4(
|
|
@@ -392,7 +391,7 @@ function CreditBalance({
|
|
|
392
391
|
{
|
|
393
392
|
type: "button",
|
|
394
393
|
onClick: () => onTopUp(Number.parseFloat(topUpValue)),
|
|
395
|
-
className: "bg-
|
|
394
|
+
className: "bg-[var(--accent-surface-soft)] border border-[var(--border-accent)] text-[var(--accent-text)] px-6 py-3 rounded-md font-bold text-xs uppercase tracking-widest active:scale-95 transition-transform hover:bg-[var(--accent-surface-strong)]",
|
|
396
395
|
children: "Top Up"
|
|
397
396
|
}
|
|
398
397
|
)
|
|
@@ -405,7 +404,7 @@ function CreditBalance({
|
|
|
405
404
|
setTopUpValue(String(qa));
|
|
406
405
|
onTopUp(qa);
|
|
407
406
|
},
|
|
408
|
-
className: "flex-1 py-2 text-[10px] font-mono text-
|
|
407
|
+
className: "flex-1 py-2 text-[10px] font-mono text-[var(--text-muted)] border border-[var(--border-subtle)] rounded-md hover:bg-[var(--depth-3)] hover:text-[var(--text-secondary)] transition-colors uppercase",
|
|
409
408
|
children: [
|
|
410
409
|
"+$",
|
|
411
410
|
qa
|
|
@@ -418,77 +417,73 @@ function CreditBalance({
|
|
|
418
417
|
}
|
|
419
418
|
|
|
420
419
|
// src/dashboard/invoice-table.tsx
|
|
420
|
+
import { Download, FileText } from "lucide-react";
|
|
421
421
|
import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
422
|
-
function MaterialIcon2({ name, className }) {
|
|
423
|
-
return /* @__PURE__ */ jsx5("span", { className: cn("material-symbols-outlined", className), style: { fontVariationSettings: "'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24" }, children: name });
|
|
424
|
-
}
|
|
425
422
|
var statusStyle = {
|
|
426
|
-
paid: "bg-
|
|
427
|
-
pending: "bg-
|
|
428
|
-
failed: "bg-
|
|
423
|
+
paid: "bg-[var(--accent-surface-soft)] text-[var(--brand-cool)] border border-[var(--border-accent)]",
|
|
424
|
+
pending: "bg-[var(--surface-warning-bg)] text-[var(--surface-warning-text)] border border-[var(--surface-warning-border)]",
|
|
425
|
+
failed: "bg-[var(--surface-danger-bg)] text-[var(--surface-danger-text)] border border-[var(--surface-danger-border)]"
|
|
429
426
|
};
|
|
430
427
|
function InvoiceTable({ invoices, onExportAll, onLoadMore, onViewInvoice, hasMore, className }) {
|
|
431
428
|
return /* @__PURE__ */ jsxs4("section", { className, children: [
|
|
432
429
|
/* @__PURE__ */ jsxs4("div", { className: "flex justify-between items-center mb-6 px-2", children: [
|
|
433
|
-
/* @__PURE__ */ jsx5("h2", { className: "text-2xl font-bold text-
|
|
434
|
-
onExportAll && /* @__PURE__ */ jsxs4("button", { type: "button", onClick: onExportAll, className: "text-[10px] font-mono text-
|
|
435
|
-
/* @__PURE__ */ jsx5(
|
|
430
|
+
/* @__PURE__ */ jsx5("h2", { className: "text-2xl font-bold text-[var(--text-primary)] tracking-tight", children: "Invoice History" }),
|
|
431
|
+
onExportAll && /* @__PURE__ */ jsxs4("button", { type: "button", onClick: onExportAll, className: "text-[10px] font-mono text-[var(--brand-cool)] uppercase tracking-widest flex items-center gap-2 hover:underline", children: [
|
|
432
|
+
/* @__PURE__ */ jsx5(Download, { className: "h-3.5 w-3.5" }),
|
|
436
433
|
"Export All"
|
|
437
434
|
] })
|
|
438
435
|
] }),
|
|
439
|
-
/* @__PURE__ */ jsx5("div", { className: "bg-
|
|
440
|
-
/* @__PURE__ */ jsx5("thead", { children: /* @__PURE__ */ jsxs4("tr", { className: "bg-
|
|
441
|
-
/* @__PURE__ */ jsx5("th", { className: "px-6 py-4 font-mono text-[10px] text-
|
|
442
|
-
/* @__PURE__ */ jsx5("th", { className: "px-6 py-4 font-mono text-[10px] text-
|
|
443
|
-
/* @__PURE__ */ jsx5("th", { className: "px-6 py-4 font-mono text-[10px] text-
|
|
444
|
-
/* @__PURE__ */ jsx5("th", { className: "px-6 py-4 font-mono text-[10px] text-
|
|
445
|
-
/* @__PURE__ */ jsx5("th", { className: "px-6 py-4 font-mono text-[10px] text-
|
|
436
|
+
/* @__PURE__ */ jsx5("div", { className: "bg-[var(--depth-2)] rounded-xl overflow-hidden border border-[var(--border-subtle)]", children: /* @__PURE__ */ jsxs4("table", { className: "w-full text-left border-collapse", children: [
|
|
437
|
+
/* @__PURE__ */ jsx5("thead", { children: /* @__PURE__ */ jsxs4("tr", { className: "bg-[var(--depth-1)] border-b border-[var(--border-subtle)]", children: [
|
|
438
|
+
/* @__PURE__ */ jsx5("th", { className: "px-6 py-4 font-mono text-[10px] text-[var(--text-muted)] uppercase tracking-widest", children: "Invoice ID" }),
|
|
439
|
+
/* @__PURE__ */ jsx5("th", { className: "px-6 py-4 font-mono text-[10px] text-[var(--text-muted)] uppercase tracking-widest", children: "Date" }),
|
|
440
|
+
/* @__PURE__ */ jsx5("th", { className: "px-6 py-4 font-mono text-[10px] text-[var(--text-muted)] uppercase tracking-widest", children: "Amount" }),
|
|
441
|
+
/* @__PURE__ */ jsx5("th", { className: "px-6 py-4 font-mono text-[10px] text-[var(--text-muted)] uppercase tracking-widest", children: "Status" }),
|
|
442
|
+
/* @__PURE__ */ jsx5("th", { className: "px-6 py-4 font-mono text-[10px] text-[var(--text-muted)] uppercase tracking-widest text-right", children: "Action" })
|
|
446
443
|
] }) }),
|
|
447
|
-
/* @__PURE__ */ jsx5("tbody", { className: "divide-y divide-
|
|
448
|
-
/* @__PURE__ */ jsx5("td", { className: "px-6 py-5 font-mono text-xs text-
|
|
449
|
-
/* @__PURE__ */ jsx5("td", { className: "px-6 py-5 text-sm text-
|
|
450
|
-
/* @__PURE__ */ jsxs4("td", { className: "px-6 py-5 text-sm font-bold text-
|
|
444
|
+
/* @__PURE__ */ jsx5("tbody", { className: "divide-y divide-[var(--border-subtle)]", children: invoices.map((inv) => /* @__PURE__ */ jsxs4("tr", { className: "hover:bg-[var(--depth-3)] transition-colors", children: [
|
|
445
|
+
/* @__PURE__ */ jsx5("td", { className: "px-6 py-5 font-mono text-xs text-[var(--text-primary)]", children: inv.id }),
|
|
446
|
+
/* @__PURE__ */ jsx5("td", { className: "px-6 py-5 text-sm text-[var(--text-secondary)]", children: inv.date }),
|
|
447
|
+
/* @__PURE__ */ jsxs4("td", { className: "px-6 py-5 text-sm font-bold text-[var(--text-primary)]", children: [
|
|
451
448
|
"$",
|
|
452
449
|
inv.amount.toFixed(2)
|
|
453
450
|
] }),
|
|
454
451
|
/* @__PURE__ */ jsx5("td", { className: "px-6 py-5", children: /* @__PURE__ */ jsx5("span", { className: cn("px-2 py-1 text-[10px] font-mono rounded uppercase", statusStyle[inv.status] ?? statusStyle.paid), children: inv.status }) }),
|
|
455
|
-
/* @__PURE__ */ jsx5("td", { className: "px-6 py-5 text-right", children: /* @__PURE__ */ jsx5("button", { type: "button", onClick: () => onViewInvoice?.(inv.id), className: "text-
|
|
452
|
+
/* @__PURE__ */ jsx5("td", { className: "px-6 py-5 text-right", children: /* @__PURE__ */ jsx5("button", { type: "button", onClick: () => onViewInvoice?.(inv.id), className: "text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors", children: /* @__PURE__ */ jsx5(FileText, { className: "h-4 w-4" }) }) })
|
|
456
453
|
] }, inv.id)) })
|
|
457
454
|
] }) }),
|
|
458
|
-
hasMore && onLoadMore && /* @__PURE__ */ jsx5("div", { className: "mt-6 flex justify-center", children: /* @__PURE__ */ jsx5("button", { type: "button", onClick: onLoadMore, className: "px-8 py-2 text-[10px] font-mono text-
|
|
455
|
+
hasMore && onLoadMore && /* @__PURE__ */ jsx5("div", { className: "mt-6 flex justify-center", children: /* @__PURE__ */ jsx5("button", { type: "button", onClick: onLoadMore, className: "px-8 py-2 text-[10px] font-mono text-[var(--text-muted)] border border-[var(--border-subtle)] rounded-full hover:bg-[var(--depth-3)] transition-colors uppercase tracking-widest", children: "Load More History" }) })
|
|
459
456
|
] });
|
|
460
457
|
}
|
|
461
458
|
|
|
462
459
|
// src/dashboard/plan-cards.tsx
|
|
460
|
+
import { Check } from "lucide-react";
|
|
463
461
|
import { jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
464
|
-
function MaterialIcon3({ name, className }) {
|
|
465
|
-
return /* @__PURE__ */ jsx6("span", { className: cn("material-symbols-outlined", className), style: { fontVariationSettings: "'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24" }, children: name });
|
|
466
|
-
}
|
|
467
462
|
function PlanCards({ plans, className }) {
|
|
468
463
|
return /* @__PURE__ */ jsxs5("section", { className, children: [
|
|
469
|
-
/* @__PURE__ */ jsx6("h2", { className: "text-2xl font-bold text-
|
|
464
|
+
/* @__PURE__ */ jsx6("h2", { className: "text-2xl font-bold text-[var(--text-primary)] tracking-tight mb-8 px-2", children: "Subscription Plans" }),
|
|
470
465
|
/* @__PURE__ */ jsx6("div", { className: "grid grid-cols-1 md:grid-cols-3 gap-6", children: plans.map((plan) => /* @__PURE__ */ jsxs5(
|
|
471
466
|
"div",
|
|
472
467
|
{
|
|
473
468
|
className: cn(
|
|
474
|
-
"p-8 rounded-xl transition-all",
|
|
475
|
-
plan.popular ? "bg-
|
|
469
|
+
"p-8 rounded-xl transition-all relative overflow-hidden border",
|
|
470
|
+
plan.popular ? "bg-[var(--depth-3)] border-[var(--border-accent)]" : "bg-[var(--depth-2)] border-[var(--border-subtle)] hover:bg-[var(--depth-3)] hover:border-[var(--border-default)]"
|
|
476
471
|
),
|
|
477
472
|
children: [
|
|
478
|
-
plan.popular && /* @__PURE__ */ jsx6("div", { className: "absolute top-0 right-0 bg-
|
|
473
|
+
plan.popular && /* @__PURE__ */ jsx6("div", { className: "absolute top-0 right-0 bg-[var(--accent-surface-soft)] border-l border-b border-[var(--border-accent)] px-4 py-1 text-[10px] font-bold text-[var(--accent-text)] uppercase tracking-widest rounded-bl-lg", children: "Popular" }),
|
|
479
474
|
/* @__PURE__ */ jsxs5("div", { className: "mb-6", children: [
|
|
480
|
-
/* @__PURE__ */ jsx6("div", { className: cn("text-xs font-mono uppercase tracking-widest mb-2", plan.popular ? "text-
|
|
481
|
-
/* @__PURE__ */ jsxs5("div", { className: "text-3xl font-bold text-
|
|
475
|
+
/* @__PURE__ */ jsx6("div", { className: cn("text-xs font-mono uppercase tracking-widest mb-2", plan.popular ? "text-[var(--brand-cool)]" : "text-[var(--text-muted)]"), children: plan.name }),
|
|
476
|
+
/* @__PURE__ */ jsxs5("div", { className: "text-3xl font-bold text-[var(--text-primary)]", children: [
|
|
482
477
|
"$",
|
|
483
478
|
plan.price,
|
|
484
|
-
/* @__PURE__ */ jsxs5("span", { className: "text-sm font-normal text-
|
|
479
|
+
/* @__PURE__ */ jsxs5("span", { className: "text-sm font-normal text-[var(--text-muted)] tracking-normal", children: [
|
|
485
480
|
"/",
|
|
486
481
|
plan.period ?? "mo"
|
|
487
482
|
] })
|
|
488
483
|
] })
|
|
489
484
|
] }),
|
|
490
|
-
/* @__PURE__ */ jsx6("ul", { className: "space-y-3 mb-8 text-sm text-
|
|
491
|
-
/* @__PURE__ */ jsx6(
|
|
485
|
+
/* @__PURE__ */ jsx6("ul", { className: "space-y-3 mb-8 text-sm text-[var(--text-muted)]", children: plan.features.map((f, i) => /* @__PURE__ */ jsxs5("li", { className: "flex items-center gap-2", children: [
|
|
486
|
+
/* @__PURE__ */ jsx6(Check, { className: "h-3.5 w-3.5 text-[var(--brand-cool)] shrink-0" }),
|
|
492
487
|
f.text
|
|
493
488
|
] }, i)) }),
|
|
494
489
|
/* @__PURE__ */ jsx6(
|
|
@@ -497,8 +492,8 @@ function PlanCards({ plans, className }) {
|
|
|
497
492
|
type: "button",
|
|
498
493
|
onClick: () => plan.onSelect?.(plan.id),
|
|
499
494
|
className: cn(
|
|
500
|
-
"w-full py-3 rounded-lg text-xs font-bold uppercase tracking-widest transition-all",
|
|
501
|
-
plan.current ? "border
|
|
495
|
+
"w-full py-3 rounded-lg text-xs font-bold uppercase tracking-widest transition-all border",
|
|
496
|
+
plan.current ? "border-[var(--border-subtle)] text-[var(--text-muted)] hover:border-[var(--border-default)] hover:text-[var(--text-secondary)]" : plan.popular ? "bg-[var(--accent-surface-soft)] border-[var(--border-accent)] text-[var(--accent-text)] hover:bg-[var(--accent-surface-strong)] active:scale-95 transition-transform" : "border-[var(--border-subtle)] text-[var(--text-secondary)] hover:border-[var(--border-accent)] hover:text-[var(--brand-cool)]"
|
|
502
497
|
),
|
|
503
498
|
children: plan.ctaLabel ?? (plan.current ? "Current Plan" : "Upgrade Now")
|
|
504
499
|
}
|
|
@@ -512,17 +507,8 @@ function PlanCards({ plans, className }) {
|
|
|
512
507
|
|
|
513
508
|
// src/dashboard/dashboard-layout.tsx
|
|
514
509
|
import * as React3 from "react";
|
|
510
|
+
import { Plus, Bell } from "lucide-react";
|
|
515
511
|
import { Fragment as Fragment3, jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
516
|
-
function MaterialIcon4({ name, className }) {
|
|
517
|
-
return /* @__PURE__ */ jsx7(
|
|
518
|
-
"span",
|
|
519
|
-
{
|
|
520
|
-
className: cn("material-symbols-outlined", className),
|
|
521
|
-
style: { fontVariationSettings: "'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24" },
|
|
522
|
-
children: name
|
|
523
|
-
}
|
|
524
|
-
);
|
|
525
|
-
}
|
|
526
512
|
function SettingsIconSmall({ className }) {
|
|
527
513
|
return /* @__PURE__ */ jsxs6("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: [
|
|
528
514
|
/* @__PURE__ */ jsx7("title", { children: "Settings" }),
|
|
@@ -585,7 +571,7 @@ function DashboardLayoutInner({
|
|
|
585
571
|
const activePanel = panels.find((p) => p.mode === mode);
|
|
586
572
|
const sidebarContent = /* @__PURE__ */ jsxs6(Fragment3, { children: [
|
|
587
573
|
/* @__PURE__ */ jsxs6(SidebarRail, { children: [
|
|
588
|
-
/* @__PURE__ */ jsx7(SidebarRailHeader, { children: /* @__PURE__ */ jsx7(Link, { href: "/", to: "/", className: "p-1 rounded-md transition-colors hover:bg-
|
|
574
|
+
/* @__PURE__ */ jsx7(SidebarRailHeader, { children: /* @__PURE__ */ jsx7(Link, { href: "/", to: "/", className: "p-1 rounded-md transition-colors hover:bg-[var(--depth-3)]", children: /* @__PURE__ */ jsx7(Logo, { variant, size: "sm", iconOnly: true }) }) }),
|
|
589
575
|
/* @__PURE__ */ jsx7(SidebarRailNav, { children: navItems.map((item, i) => {
|
|
590
576
|
const isMode = modeSet.has(item.id);
|
|
591
577
|
const prevIsMode = i > 0 && modeSet.has(navItems[i - 1].id);
|
|
@@ -633,11 +619,11 @@ function DashboardLayoutInner({
|
|
|
633
619
|
/* @__PURE__ */ jsx7(SidebarPanelContent, { children: activePanel?.content })
|
|
634
620
|
] })
|
|
635
621
|
] });
|
|
636
|
-
return /* @__PURE__ */ jsxs6("div", { className: cn("min-h-screen bg-
|
|
622
|
+
return /* @__PURE__ */ jsxs6("div", { className: cn("min-h-screen bg-[var(--depth-1)] text-[var(--text-primary)]", className), children: [
|
|
637
623
|
/* @__PURE__ */ jsxs6(
|
|
638
624
|
"nav",
|
|
639
625
|
{
|
|
640
|
-
className: "fixed top-0 z-50 bg-
|
|
626
|
+
className: "fixed top-0 z-50 bg-[var(--depth-2)] border-b border-[var(--border-subtle)] flex justify-between items-center px-8 h-14 font-sans text-sm tracking-tight transition-[left,width] duration-200 ease-in-out",
|
|
641
627
|
style: {
|
|
642
628
|
left: hidden ? 0 : contentMargin,
|
|
643
629
|
width: hidden ? "100%" : `calc(100% - ${contentMargin}px)`
|
|
@@ -650,7 +636,7 @@ function DashboardLayoutInner({
|
|
|
650
636
|
to: link.href,
|
|
651
637
|
className: cn(
|
|
652
638
|
"transition-all duration-300 px-2 py-1 rounded",
|
|
653
|
-
activeTopNavHref === link.href ? "text-
|
|
639
|
+
activeTopNavHref === link.href ? "text-[var(--text-primary)] border-b-2 border-[var(--brand-cool)] pb-1" : "text-[var(--text-muted)] hover:text-[var(--text-primary)] hover:bg-[var(--depth-3)]"
|
|
654
640
|
),
|
|
655
641
|
children: link.label
|
|
656
642
|
},
|
|
@@ -662,21 +648,21 @@ function DashboardLayoutInner({
|
|
|
662
648
|
{
|
|
663
649
|
type: "button",
|
|
664
650
|
onClick: onNewSandbox,
|
|
665
|
-
className: "hidden md:flex items-center gap-2 bg-
|
|
651
|
+
className: "hidden md:flex items-center gap-2 bg-[var(--accent-surface-soft)] border border-[var(--border-accent)] text-[var(--accent-text)] px-4 py-2 rounded-lg font-bold hover:bg-[var(--accent-surface-strong)] transition-all active:scale-95 text-xs",
|
|
666
652
|
children: [
|
|
667
|
-
/* @__PURE__ */ jsx7(
|
|
653
|
+
/* @__PURE__ */ jsx7(Plus, { className: "h-3.5 w-3.5" }),
|
|
668
654
|
"New Sandbox"
|
|
669
655
|
]
|
|
670
656
|
}
|
|
671
657
|
),
|
|
672
|
-
/* @__PURE__ */ jsx7("button", { type: "button", className: "text-
|
|
658
|
+
/* @__PURE__ */ jsx7("button", { type: "button", className: "text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-colors p-2 rounded-lg hover:bg-[var(--depth-3)]", children: /* @__PURE__ */ jsx7(Bell, { className: "h-4 w-4" }) })
|
|
673
659
|
] }),
|
|
674
660
|
/* @__PURE__ */ jsx7(
|
|
675
661
|
"button",
|
|
676
662
|
{
|
|
677
663
|
type: "button",
|
|
678
664
|
onClick: () => setMobileMenuOpen(!mobileMenuOpen),
|
|
679
|
-
className: "rounded-md p-2 hover:bg-
|
|
665
|
+
className: "rounded-md p-2 hover:bg-[var(--depth-3)] lg:hidden",
|
|
680
666
|
"aria-label": mobileMenuOpen ? "Close menu" : "Open menu",
|
|
681
667
|
"aria-expanded": mobileMenuOpen,
|
|
682
668
|
children: mobileMenuOpen ? /* @__PURE__ */ jsx7(XIcon, { className: "h-6 w-6" }) : /* @__PURE__ */ jsx7(MenuIcon, { className: "h-6 w-6" })
|
|
@@ -690,7 +676,7 @@ function DashboardLayoutInner({
|
|
|
690
676
|
"aside",
|
|
691
677
|
{
|
|
692
678
|
className: cn(
|
|
693
|
-
"fixed top-14 bottom-0 left-0 z-30 flex bg-
|
|
679
|
+
"fixed top-14 bottom-0 left-0 z-30 flex bg-[var(--depth-1)] transition-transform duration-200 lg:hidden",
|
|
694
680
|
mobileMenuOpen ? "translate-x-0" : "-translate-x-full"
|
|
695
681
|
),
|
|
696
682
|
style: { width: SIDEBAR_TOTAL_WIDTH },
|
|
@@ -709,30 +695,26 @@ function DashboardLayout({ defaultPanelOpen, defaultMode, ...props }) {
|
|
|
709
695
|
|
|
710
696
|
// src/dashboard/resource-meter.tsx
|
|
711
697
|
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
712
|
-
function
|
|
713
|
-
if (percent >= 90) return "
|
|
714
|
-
if (percent >= 70) return "
|
|
715
|
-
|
|
716
|
-
return "from-green-500 to-green-300";
|
|
717
|
-
}
|
|
718
|
-
function MaterialIcon5({ name, className }) {
|
|
719
|
-
return /* @__PURE__ */ jsx8("span", { className: cn("material-symbols-outlined", className), style: { fontVariationSettings: "'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24" }, children: name });
|
|
698
|
+
function getBarColor(percent) {
|
|
699
|
+
if (percent >= 90) return "bg-[var(--code-error)]";
|
|
700
|
+
if (percent >= 70) return "bg-[var(--surface-warning-text)]";
|
|
701
|
+
return "bg-[var(--brand-cool)]";
|
|
720
702
|
}
|
|
721
703
|
function ResourceMeter({ label, value, max = 100, unit, icon, className }) {
|
|
722
704
|
const percent = max > 0 ? Math.min(value / max * 100, 100) : 0;
|
|
723
|
-
const
|
|
724
|
-
return /* @__PURE__ */ jsxs7("div", { className: cn("space-y-
|
|
725
|
-
/* @__PURE__ */ jsxs7("div", { className: "flex justify-between text-[
|
|
726
|
-
/* @__PURE__ */ jsxs7("span", { className: "flex items-center gap-1", children: [
|
|
727
|
-
icon
|
|
705
|
+
const barColor = getBarColor(percent);
|
|
706
|
+
return /* @__PURE__ */ jsxs7("div", { className: cn("space-y-1.5", className), children: [
|
|
707
|
+
/* @__PURE__ */ jsxs7("div", { className: "flex justify-between text-[10px] font-mono text-[var(--text-muted)] uppercase tracking-wide", children: [
|
|
708
|
+
/* @__PURE__ */ jsxs7("span", { className: "flex items-center gap-1 text-[var(--text-secondary)]", children: [
|
|
709
|
+
icon,
|
|
728
710
|
label
|
|
729
711
|
] }),
|
|
730
|
-
/* @__PURE__ */ jsx8("span", { className: "
|
|
712
|
+
/* @__PURE__ */ jsx8("span", { className: "tabular-nums", children: unit ? `${value}${unit} / ${max}${unit}` : `${Math.round(percent)}%` })
|
|
731
713
|
] }),
|
|
732
|
-
/* @__PURE__ */ jsx8("div", { className: "h-
|
|
714
|
+
/* @__PURE__ */ jsx8("div", { className: "h-1.5 w-full bg-[var(--depth-1)] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx8(
|
|
733
715
|
"div",
|
|
734
716
|
{
|
|
735
|
-
className: cn("h-full
|
|
717
|
+
className: cn("h-full rounded-full transition-all duration-500", barColor),
|
|
736
718
|
style: { width: `${percent}%` }
|
|
737
719
|
}
|
|
738
720
|
) })
|
|
@@ -740,34 +722,18 @@ function ResourceMeter({ label, value, max = 100, unit, icon, className }) {
|
|
|
740
722
|
}
|
|
741
723
|
|
|
742
724
|
// src/dashboard/sandbox-card.tsx
|
|
725
|
+
import { Cpu, Database, Plus as Plus2, Terminal, Power, ExternalLink, RefreshCw } from "lucide-react";
|
|
743
726
|
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
744
|
-
function MaterialIcon6({ name, className }) {
|
|
745
|
-
return /* @__PURE__ */ jsx9("span", { className: cn("material-symbols-outlined", className), style: { fontVariationSettings: "'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24" }, children: name });
|
|
746
|
-
}
|
|
747
727
|
var statusConfig = {
|
|
748
|
-
running: { color: "text-
|
|
749
|
-
hibernating: { color: "text-
|
|
750
|
-
provisioning: { color: "text-
|
|
751
|
-
stopped: { color: "text-
|
|
752
|
-
failed: { color: "text-
|
|
753
|
-
archived: { color: "text-
|
|
754
|
-
};
|
|
755
|
-
var glowMap = {
|
|
756
|
-
node: "shadow-[0_0_20px_-5px_rgba(34,197,94,0.15)] border border-green-500/20",
|
|
757
|
-
python: "shadow-[0_0_20px_-5px_rgba(59,130,246,0.15)] border border-blue-500/20",
|
|
758
|
-
ubuntu: "shadow-[0_0_20px_-5px_rgba(234,88,12,0.15)] border border-orange-500/20"
|
|
728
|
+
running: { color: "text-[var(--surface-success-text)]", bg: "bg-[var(--surface-success-bg)]", border: "border-[var(--surface-success-border)]", dotClass: "bg-[var(--surface-success-text)] animate-pulse", label: "Running" },
|
|
729
|
+
hibernating: { color: "text-[var(--text-muted)]", bg: "bg-[var(--depth-3)]", border: "border-[var(--border-subtle)]", dotClass: "bg-[var(--text-muted)]", label: "Hibernating" },
|
|
730
|
+
provisioning: { color: "text-[var(--brand-cool)]", bg: "bg-[var(--accent-surface-soft)]", border: "border-[var(--border-accent)]", dotClass: "bg-[var(--brand-cool)] animate-pulse", label: "Provisioning" },
|
|
731
|
+
stopped: { color: "text-[var(--text-muted)]", bg: "bg-[var(--depth-3)]", border: "border-[var(--border-subtle)]", dotClass: "bg-[var(--text-muted)]", label: "Stopped" },
|
|
732
|
+
failed: { color: "text-[var(--surface-danger-text)]", bg: "bg-[var(--surface-danger-bg)]", border: "border-[var(--surface-danger-border)]", dotClass: "bg-[var(--surface-danger-text)]", label: "Failed" },
|
|
733
|
+
archived: { color: "text-[var(--text-muted)]", bg: "bg-[var(--depth-3)]", border: "border-[var(--border-subtle)]", dotClass: "bg-[var(--border-default)]", label: "Archived" }
|
|
759
734
|
};
|
|
760
|
-
function getGlow(image) {
|
|
761
|
-
if (!image) return "";
|
|
762
|
-
const lower = image.toLowerCase();
|
|
763
|
-
for (const [key, cls] of Object.entries(glowMap)) {
|
|
764
|
-
if (lower.includes(key)) return cls;
|
|
765
|
-
}
|
|
766
|
-
return "";
|
|
767
|
-
}
|
|
768
735
|
function SandboxCard({ sandbox, onOpenIDE, onOpenTerminal, onWake, onRestore, className }) {
|
|
769
736
|
const status = statusConfig[sandbox.status] ?? statusConfig.stopped;
|
|
770
|
-
const glow = getGlow(sandbox.image);
|
|
771
737
|
const isActive = sandbox.status === "running";
|
|
772
738
|
const isHibernating = sandbox.status === "hibernating";
|
|
773
739
|
const isProvisioning = sandbox.status === "provisioning";
|
|
@@ -776,54 +742,62 @@ function SandboxCard({ sandbox, onOpenIDE, onOpenTerminal, onWake, onRestore, cl
|
|
|
776
742
|
"div",
|
|
777
743
|
{
|
|
778
744
|
className: cn(
|
|
779
|
-
"bg-
|
|
780
|
-
|
|
781
|
-
isArchived && "opacity-60 hover:opacity-100
|
|
745
|
+
"bg-[var(--depth-2)] rounded-xl p-5 relative overflow-hidden group hover:bg-[var(--depth-3)] transition-all duration-300 border border-[var(--border-subtle)] hover:border-[var(--border-default)]",
|
|
746
|
+
isActive && "border-[var(--border-accent)]",
|
|
747
|
+
isArchived && "opacity-60 hover:opacity-100",
|
|
782
748
|
className
|
|
783
749
|
),
|
|
784
750
|
children: [
|
|
785
|
-
/* @__PURE__ */ jsx9("div", { className: "absolute top-0 right-0 p-4", children: /* @__PURE__ */ jsxs8("span", { className: cn(
|
|
786
|
-
|
|
751
|
+
/* @__PURE__ */ jsx9("div", { className: "absolute top-0 right-0 p-4", children: /* @__PURE__ */ jsxs8("span", { className: cn(
|
|
752
|
+
"flex items-center gap-1.5 px-2.5 py-1 rounded-full text-[10px] font-bold tracking-wider uppercase border",
|
|
753
|
+
status.bg,
|
|
754
|
+
status.color,
|
|
755
|
+
status.border
|
|
756
|
+
), children: [
|
|
757
|
+
/* @__PURE__ */ jsx9("span", { className: cn("w-1.5 h-1.5 rounded-full", status.dotClass) }),
|
|
787
758
|
status.label
|
|
788
759
|
] }) }),
|
|
789
|
-
/* @__PURE__ */ jsx9("div", { className: "mb-
|
|
790
|
-
sandbox.imageIcon && /* @__PURE__ */ jsx9("div", { className: "w-
|
|
760
|
+
/* @__PURE__ */ jsx9("div", { className: "mb-5 pr-24", children: /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-3 mb-1", children: [
|
|
761
|
+
sandbox.imageIcon && /* @__PURE__ */ jsx9("div", { className: "w-9 h-9 rounded-lg flex items-center justify-center bg-[var(--depth-3)] border border-[var(--border-subtle)] shrink-0", children: sandbox.imageIcon }),
|
|
791
762
|
/* @__PURE__ */ jsxs8("div", { className: "min-w-0", children: [
|
|
792
|
-
/* @__PURE__ */ jsx9("h3", { className: "text-
|
|
793
|
-
sandbox.nodeId && /* @__PURE__ */ jsx9("p", { className: "text-
|
|
763
|
+
/* @__PURE__ */ jsx9("h3", { className: "text-base font-bold text-[var(--text-primary)] group-hover:text-[var(--brand-cool)] transition-colors truncate leading-tight", children: sandbox.name }),
|
|
764
|
+
sandbox.nodeId && /* @__PURE__ */ jsx9("p", { className: "text-[var(--text-muted)] font-mono text-[10px] truncate mt-0.5", children: sandbox.nodeId })
|
|
794
765
|
] })
|
|
795
766
|
] }) }),
|
|
796
|
-
isProvisioning ? /* @__PURE__ */ jsxs8("div", { className: "mb-
|
|
797
|
-
/* @__PURE__ */
|
|
798
|
-
|
|
767
|
+
isProvisioning ? /* @__PURE__ */ jsxs8("div", { className: "mb-5 mt-2", children: [
|
|
768
|
+
/* @__PURE__ */ jsxs8("p", { className: "text-[10px] font-bold font-mono text-[var(--brand-cool)] mb-2 uppercase tracking-widest flex items-center gap-2 animate-pulse", children: [
|
|
769
|
+
/* @__PURE__ */ jsx9(RefreshCw, { className: "h-3 w-3 animate-spin" }),
|
|
770
|
+
sandbox.provisioningMessage ?? "Initializing..."
|
|
771
|
+
] }),
|
|
772
|
+
/* @__PURE__ */ jsx9("div", { className: "h-1.5 w-full bg-[var(--depth-1)] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx9(
|
|
799
773
|
"div",
|
|
800
774
|
{
|
|
801
|
-
className: "h-full bg-
|
|
775
|
+
className: "h-full bg-[var(--brand-cool)] transition-all duration-500",
|
|
802
776
|
style: { width: `${sandbox.provisioningPercent ?? 50}%` }
|
|
803
777
|
}
|
|
804
778
|
) })
|
|
805
|
-
] }) : !isArchived ? /* @__PURE__ */ jsxs8("div", { className: cn("space-y-
|
|
806
|
-
/* @__PURE__ */ jsx9(ResourceMeter, { label: "CPU
|
|
779
|
+
] }) : !isArchived ? /* @__PURE__ */ jsxs8("div", { className: cn("space-y-4 mb-5", !isActive && "opacity-35"), children: [
|
|
780
|
+
/* @__PURE__ */ jsx9(ResourceMeter, { label: "CPU", icon: /* @__PURE__ */ jsx9(Cpu, { className: "h-3 w-3" }), value: sandbox.cpuPercent ?? 0 }),
|
|
807
781
|
/* @__PURE__ */ jsx9(
|
|
808
782
|
ResourceMeter,
|
|
809
783
|
{
|
|
810
|
-
label: "RAM
|
|
811
|
-
icon: "
|
|
784
|
+
label: "RAM",
|
|
785
|
+
icon: /* @__PURE__ */ jsx9(Database, { className: "h-3 w-3" }),
|
|
812
786
|
value: sandbox.ramUsed ?? 0,
|
|
813
787
|
max: sandbox.ramTotal ?? 1,
|
|
814
788
|
unit: "GB"
|
|
815
789
|
}
|
|
816
790
|
)
|
|
817
|
-
] }) : /* @__PURE__ */ jsx9("div", { className: "mb-
|
|
818
|
-
isActive && /* @__PURE__ */ jsxs8("div", { className: "grid grid-cols-2 gap-
|
|
791
|
+
] }) : /* @__PURE__ */ jsx9("div", { className: "mb-4", children: sandbox.archivedAt && /* @__PURE__ */ jsx9("p", { className: "text-[var(--text-muted)] font-mono text-[10px]", children: sandbox.archivedAt }) }),
|
|
792
|
+
isActive && /* @__PURE__ */ jsxs8("div", { className: "grid grid-cols-2 gap-2", children: [
|
|
819
793
|
/* @__PURE__ */ jsxs8(
|
|
820
794
|
"button",
|
|
821
795
|
{
|
|
822
796
|
type: "button",
|
|
823
797
|
onClick: () => onOpenIDE?.(sandbox.id),
|
|
824
|
-
className: "flex items-center justify-center gap-2 py-2
|
|
798
|
+
className: "flex items-center justify-center gap-2 py-2 bg-[var(--accent-surface-soft)] hover:bg-[var(--accent-surface-strong)] text-[var(--accent-text)] rounded-lg transition-all text-xs font-semibold border border-[var(--border-accent)]",
|
|
825
799
|
children: [
|
|
826
|
-
/* @__PURE__ */ jsx9(
|
|
800
|
+
/* @__PURE__ */ jsx9(ExternalLink, { className: "h-3.5 w-3.5" }),
|
|
827
801
|
"Open IDE"
|
|
828
802
|
]
|
|
829
803
|
}
|
|
@@ -833,9 +807,9 @@ function SandboxCard({ sandbox, onOpenIDE, onOpenTerminal, onWake, onRestore, cl
|
|
|
833
807
|
{
|
|
834
808
|
type: "button",
|
|
835
809
|
onClick: () => onOpenTerminal?.(sandbox.id),
|
|
836
|
-
className: "flex items-center justify-center gap-2 py-2
|
|
810
|
+
className: "flex items-center justify-center gap-2 py-2 bg-[var(--depth-3)] hover:bg-[var(--depth-4)] text-[var(--text-secondary)] hover:text-[var(--text-primary)] rounded-lg transition-all text-xs font-semibold border border-[var(--border-subtle)]",
|
|
837
811
|
children: [
|
|
838
|
-
/* @__PURE__ */ jsx9(
|
|
812
|
+
/* @__PURE__ */ jsx9(Terminal, { className: "h-3.5 w-3.5" }),
|
|
839
813
|
"Terminal"
|
|
840
814
|
]
|
|
841
815
|
}
|
|
@@ -846,9 +820,9 @@ function SandboxCard({ sandbox, onOpenIDE, onOpenTerminal, onWake, onRestore, cl
|
|
|
846
820
|
{
|
|
847
821
|
type: "button",
|
|
848
822
|
onClick: () => onWake?.(sandbox.id),
|
|
849
|
-
className: "w-full flex items-center justify-center gap-2 py-
|
|
823
|
+
className: "w-full flex items-center justify-center gap-2 py-2.5 bg-[var(--accent-surface-soft)] text-[var(--brand-cool)] hover:bg-[var(--accent-surface-strong)] rounded-lg transition-all text-xs font-bold border border-[var(--border-accent)]",
|
|
850
824
|
children: [
|
|
851
|
-
/* @__PURE__ */ jsx9(
|
|
825
|
+
/* @__PURE__ */ jsx9(Power, { className: "h-3.5 w-3.5" }),
|
|
852
826
|
"Wake Sandbox"
|
|
853
827
|
]
|
|
854
828
|
}
|
|
@@ -858,7 +832,7 @@ function SandboxCard({ sandbox, onOpenIDE, onOpenTerminal, onWake, onRestore, cl
|
|
|
858
832
|
{
|
|
859
833
|
type: "button",
|
|
860
834
|
disabled: true,
|
|
861
|
-
className: "w-full flex items-center justify-center gap-2 py-
|
|
835
|
+
className: "w-full flex items-center justify-center gap-2 py-2.5 bg-[var(--depth-3)] text-[var(--text-muted)] cursor-not-allowed rounded-lg text-xs font-semibold border border-[var(--border-subtle)]",
|
|
862
836
|
children: "Please Wait..."
|
|
863
837
|
}
|
|
864
838
|
),
|
|
@@ -867,7 +841,7 @@ function SandboxCard({ sandbox, onOpenIDE, onOpenTerminal, onWake, onRestore, cl
|
|
|
867
841
|
{
|
|
868
842
|
type: "button",
|
|
869
843
|
onClick: () => onRestore?.(sandbox.id),
|
|
870
|
-
className: "w-full py-2 bg-
|
|
844
|
+
className: "w-full py-2 bg-[var(--depth-3)] hover:bg-[var(--depth-4)] text-[var(--text-muted)] hover:text-[var(--text-primary)] rounded-lg transition-all text-xs font-semibold border border-[var(--border-subtle)]",
|
|
871
845
|
children: "Restore Sandbox"
|
|
872
846
|
}
|
|
873
847
|
)
|
|
@@ -882,41 +856,39 @@ function NewSandboxCard({ onClick, className }) {
|
|
|
882
856
|
type: "button",
|
|
883
857
|
onClick,
|
|
884
858
|
className: cn(
|
|
885
|
-
"border-2 border-dashed border-
|
|
859
|
+
"border-2 border-dashed border-[var(--border-subtle)] rounded-xl p-6 flex flex-col items-center justify-center text-center group cursor-pointer hover:border-[var(--border-accent)] hover:bg-[var(--accent-surface-soft)] transition-all duration-300 w-full min-h-[200px]",
|
|
886
860
|
className
|
|
887
861
|
),
|
|
888
862
|
children: [
|
|
889
|
-
/* @__PURE__ */ jsx9("div", { className: "w-
|
|
890
|
-
/* @__PURE__ */ jsx9("h4", { className: "font-bold text-
|
|
891
|
-
/* @__PURE__ */ jsx9("p", { className: "text-xs text-
|
|
863
|
+
/* @__PURE__ */ jsx9("div", { className: "w-12 h-12 rounded-full bg-[var(--depth-3)] border border-[var(--border-subtle)] flex items-center justify-center mb-4 group-hover:bg-[var(--accent-surface-strong)] group-hover:border-[var(--border-accent)] group-hover:text-[var(--accent-text)] text-[var(--text-muted)] transition-all group-active:scale-90", children: /* @__PURE__ */ jsx9(Plus2, { className: "h-6 w-6" }) }),
|
|
864
|
+
/* @__PURE__ */ jsx9("h4", { className: "font-bold text-[var(--text-secondary)] group-hover:text-[var(--text-primary)] mb-1 text-sm transition-colors", children: "New Environment" }),
|
|
865
|
+
/* @__PURE__ */ jsx9("p", { className: "text-xs text-[var(--text-muted)]", children: "Instantiate a fresh compute node" })
|
|
892
866
|
]
|
|
893
867
|
}
|
|
894
868
|
);
|
|
895
869
|
}
|
|
896
870
|
|
|
897
871
|
// src/dashboard/sandbox-table.tsx
|
|
872
|
+
import { Terminal as Terminal2, Code2, Key, MoreVertical, RefreshCw as RefreshCw2, ChevronLeft, ChevronRight } from "lucide-react";
|
|
898
873
|
import { Fragment as Fragment4, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
899
|
-
function MaterialIcon7({ name, className }) {
|
|
900
|
-
return /* @__PURE__ */ jsx10("span", { className: cn("material-symbols-outlined", className), style: { fontVariationSettings: "'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24" }, children: name });
|
|
901
|
-
}
|
|
902
874
|
var statusColors = {
|
|
903
|
-
running: { dot: "bg-
|
|
904
|
-
hibernating: { dot: "bg-
|
|
905
|
-
provisioning: { dot: "bg-
|
|
906
|
-
stopped: { dot: "bg-
|
|
907
|
-
failed: { dot: "bg-
|
|
908
|
-
archived: { dot: "bg-
|
|
875
|
+
running: { dot: "bg-[var(--code-success)] animate-pulse", text: "text-[var(--code-success)]", bar: "bg-[var(--code-success)]" },
|
|
876
|
+
hibernating: { dot: "bg-[var(--text-muted)]", text: "text-[var(--text-muted)]", bar: "bg-[var(--text-muted)]" },
|
|
877
|
+
provisioning: { dot: "bg-[var(--brand-cool)] animate-pulse", text: "text-[var(--brand-cool)]", bar: "bg-[var(--brand-cool)]" },
|
|
878
|
+
stopped: { dot: "bg-[var(--text-muted)]", text: "text-[var(--text-secondary)]", bar: "bg-[var(--text-muted)]" },
|
|
879
|
+
failed: { dot: "bg-[var(--code-error)]", text: "text-[var(--code-error)]", bar: "bg-[var(--code-error)]" },
|
|
880
|
+
archived: { dot: "bg-[var(--border-default)]", text: "text-[var(--text-muted)]", bar: "bg-[var(--border-default)]" }
|
|
909
881
|
};
|
|
910
882
|
function MiniMeter({ label, percent, className }) {
|
|
911
883
|
return /* @__PURE__ */ jsxs9("div", { className: cn("space-y-1", className), children: [
|
|
912
|
-
/* @__PURE__ */ jsxs9("div", { className: "flex justify-between text-[10px] font-mono text-
|
|
884
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex justify-between text-[10px] font-mono text-[var(--text-muted)]", children: [
|
|
913
885
|
/* @__PURE__ */ jsx10("span", { className: "font-bold", children: label }),
|
|
914
|
-
/* @__PURE__ */ jsxs9("span", { className: "text-
|
|
886
|
+
/* @__PURE__ */ jsxs9("span", { className: "text-[var(--brand-cool)]", children: [
|
|
915
887
|
percent,
|
|
916
888
|
"%"
|
|
917
889
|
] })
|
|
918
890
|
] }),
|
|
919
|
-
/* @__PURE__ */ jsx10("div", { className: "h-1.5 w-full bg-
|
|
891
|
+
/* @__PURE__ */ jsx10("div", { className: "h-1.5 w-full bg-[var(--depth-1)] rounded-full overflow-hidden", children: /* @__PURE__ */ jsx10("div", { className: "h-full bg-[var(--brand-cool)] rounded-full", style: { width: `${percent}%` } }) })
|
|
920
892
|
] });
|
|
921
893
|
}
|
|
922
894
|
function SandboxTable({
|
|
@@ -935,37 +907,37 @@ function SandboxTable({
|
|
|
935
907
|
const totalCount = total ?? sandboxes.length;
|
|
936
908
|
const totalPages = Math.ceil(totalCount / pageSize);
|
|
937
909
|
return /* @__PURE__ */ jsxs9("div", { className: cn("w-full", className), children: [
|
|
938
|
-
/* @__PURE__ */ jsx10("div", { className: "w-full bg-
|
|
939
|
-
/* @__PURE__ */ jsx10("thead", { children: /* @__PURE__ */ jsxs9("tr", { className: "bg-
|
|
940
|
-
/* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-
|
|
941
|
-
/* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-
|
|
942
|
-
/* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-
|
|
943
|
-
/* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-
|
|
944
|
-
/* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-
|
|
910
|
+
/* @__PURE__ */ jsx10("div", { className: "w-full bg-[var(--depth-2)] rounded-2xl overflow-hidden border border-[var(--border-subtle)]", children: /* @__PURE__ */ jsx10("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs9("table", { className: "w-full text-left border-collapse", children: [
|
|
911
|
+
/* @__PURE__ */ jsx10("thead", { children: /* @__PURE__ */ jsxs9("tr", { className: "bg-[var(--depth-1)] border-b border-[var(--border-subtle)]", children: [
|
|
912
|
+
/* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-[var(--text-muted)] uppercase tracking-wider", children: "Status" }),
|
|
913
|
+
/* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-[var(--text-muted)] uppercase tracking-wider", children: "Sandbox Name" }),
|
|
914
|
+
/* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-[var(--text-muted)] uppercase tracking-wider", children: "Environment" }),
|
|
915
|
+
/* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-[var(--text-muted)] uppercase tracking-wider", children: "Resources" }),
|
|
916
|
+
/* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-[var(--text-muted)] uppercase tracking-wider text-right", children: "Actions" })
|
|
945
917
|
] }) }),
|
|
946
|
-
/* @__PURE__ */ jsx10("tbody", { className: "divide-y divide-
|
|
918
|
+
/* @__PURE__ */ jsx10("tbody", { className: "divide-y divide-[var(--border-subtle)]", children: sandboxes.map((sb) => {
|
|
947
919
|
const sc = statusColors[sb.status] ?? statusColors.stopped;
|
|
948
920
|
const isActive = sb.status === "running";
|
|
949
921
|
const isHibernating = sb.status === "hibernating";
|
|
950
922
|
const isProvisioning = sb.status === "provisioning";
|
|
951
|
-
return /* @__PURE__ */ jsxs9("tr", { className: "hover:bg-
|
|
923
|
+
return /* @__PURE__ */ jsxs9("tr", { className: "hover:bg-[var(--depth-3)] transition-colors group relative", children: [
|
|
952
924
|
/* @__PURE__ */ jsx10("td", { className: "px-6 py-5 whitespace-nowrap", children: /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2", children: [
|
|
953
925
|
/* @__PURE__ */ jsx10("span", { className: cn("flex h-2.5 w-2.5 rounded-full", sc.dot) }),
|
|
954
926
|
/* @__PURE__ */ jsx10("span", { className: cn("text-xs font-bold uppercase tracking-wide", sc.text), children: sb.status.charAt(0).toUpperCase() + sb.status.slice(1) })
|
|
955
927
|
] }) }),
|
|
956
928
|
/* @__PURE__ */ jsx10("td", { className: "px-6 py-5", children: /* @__PURE__ */ jsxs9("div", { className: "flex flex-col", children: [
|
|
957
|
-
/* @__PURE__ */ jsx10("span", { className: "text-sm font-bold text-
|
|
958
|
-
sb.nodeId && /* @__PURE__ */ jsx10("span", { className: "text-[10px] font-mono text-
|
|
929
|
+
/* @__PURE__ */ jsx10("span", { className: "text-sm font-bold text-[var(--text-primary)] group-hover:text-[var(--brand-cool)] transition-colors", children: sb.name }),
|
|
930
|
+
sb.nodeId && /* @__PURE__ */ jsx10("span", { className: "text-[10px] font-mono text-[var(--text-muted)]", children: sb.nodeId })
|
|
959
931
|
] }) }),
|
|
960
932
|
/* @__PURE__ */ jsx10("td", { className: "px-6 py-5", children: /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-3", children: [
|
|
961
|
-
sb.imageIcon && /* @__PURE__ */ jsx10("div", { className: "w-8 h-8 rounded-lg bg-
|
|
962
|
-
sb.image && /* @__PURE__ */ jsx10("span", { className: "text-xs font-bold text-
|
|
933
|
+
sb.imageIcon && /* @__PURE__ */ jsx10("div", { className: "w-8 h-8 rounded-lg bg-[var(--depth-3)] flex items-center justify-center", children: sb.imageIcon }),
|
|
934
|
+
sb.image && /* @__PURE__ */ jsx10("span", { className: "text-xs font-bold text-[var(--text-primary)]", children: sb.image })
|
|
963
935
|
] }) }),
|
|
964
936
|
/* @__PURE__ */ jsx10("td", { className: "px-6 py-5", children: isActive ? /* @__PURE__ */ jsxs9("div", { className: "space-y-3 w-48", children: [
|
|
965
937
|
/* @__PURE__ */ jsx10(MiniMeter, { label: "CPU", percent: sb.cpuPercent ?? 0 }),
|
|
966
938
|
/* @__PURE__ */ jsx10(MiniMeter, { label: "RAM", percent: sb.ramTotal ? Math.round((sb.ramUsed ?? 0) / sb.ramTotal * 100) : 0 })
|
|
967
|
-
] }) : isProvisioning ? /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2 text-
|
|
968
|
-
/* @__PURE__ */ jsx10(
|
|
939
|
+
] }) : isProvisioning ? /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2 text-[var(--brand-cool)] italic text-[10px] font-bold", children: [
|
|
940
|
+
/* @__PURE__ */ jsx10(RefreshCw2, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
969
941
|
sb.provisioningMessage ?? "Allocating nodes..."
|
|
970
942
|
] }) : isHibernating ? /* @__PURE__ */ jsxs9("div", { className: "space-y-3 w-48 opacity-30", children: [
|
|
971
943
|
/* @__PURE__ */ jsx10(MiniMeter, { label: "CPU", percent: 0 }),
|
|
@@ -973,17 +945,17 @@ function SandboxTable({
|
|
|
973
945
|
] }) : null }),
|
|
974
946
|
/* @__PURE__ */ jsx10("td", { className: "px-6 py-5 text-right", children: /* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-end gap-1", children: [
|
|
975
947
|
isActive && /* @__PURE__ */ jsxs9(Fragment4, { children: [
|
|
976
|
-
/* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onOpenIDE?.(sb.id), className: "p-2 rounded-lg hover:bg-
|
|
977
|
-
/* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onOpenTerminal?.(sb.id), className: "p-2 rounded-lg hover:bg-
|
|
978
|
-
/* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onSSH?.(sb.id), className: "p-2 rounded-lg hover:bg-
|
|
948
|
+
/* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onOpenIDE?.(sb.id), className: "p-2 rounded-lg hover:bg-[var(--depth-4)] text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-all active:scale-90", title: "Open IDE", children: /* @__PURE__ */ jsx10(Code2, { className: "h-4 w-4" }) }),
|
|
949
|
+
/* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onOpenTerminal?.(sb.id), className: "p-2 rounded-lg hover:bg-[var(--depth-4)] text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-all active:scale-90", title: "Terminal", children: /* @__PURE__ */ jsx10(Terminal2, { className: "h-4 w-4" }) }),
|
|
950
|
+
/* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onSSH?.(sb.id), className: "p-2 rounded-lg hover:bg-[var(--depth-4)] text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-all active:scale-90", title: "SSH", children: /* @__PURE__ */ jsx10(Key, { className: "h-4 w-4" }) })
|
|
979
951
|
] }),
|
|
980
|
-
isHibernating && /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onWake?.(sb.id), className: "px-3 py-1.5 rounded-lg border border-
|
|
981
|
-
/* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onMore?.(sb.id), className: "p-2 rounded-lg hover:bg-
|
|
952
|
+
isHibernating && /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onWake?.(sb.id), className: "px-3 py-1.5 rounded-lg border border-[var(--border-accent)] text-[var(--brand-cool)] text-[10px] font-bold uppercase tracking-wider hover:bg-[var(--accent-surface-soft)] active:scale-95 transition-all", children: "Wake Up" }),
|
|
953
|
+
/* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onMore?.(sb.id), className: "p-2 rounded-lg hover:bg-[var(--depth-4)] text-[var(--text-muted)] hover:text-[var(--text-primary)] transition-all active:scale-90", children: /* @__PURE__ */ jsx10(MoreVertical, { className: "h-4 w-4" }) })
|
|
982
954
|
] }) })
|
|
983
955
|
] }, sb.id);
|
|
984
956
|
}) })
|
|
985
957
|
] }) }) }),
|
|
986
|
-
totalPages > 1 && /* @__PURE__ */ jsxs9("div", { className: "mt-6 flex flex-col md:flex-row justify-between items-center text-
|
|
958
|
+
totalPages > 1 && /* @__PURE__ */ jsxs9("div", { className: "mt-6 flex flex-col md:flex-row justify-between items-center text-[var(--text-muted)] text-xs font-medium gap-4", children: [
|
|
987
959
|
/* @__PURE__ */ jsxs9("p", { children: [
|
|
988
960
|
"Showing ",
|
|
989
961
|
sandboxes.length,
|
|
@@ -992,7 +964,7 @@ function SandboxTable({
|
|
|
992
964
|
" active sandboxes"
|
|
993
965
|
] }),
|
|
994
966
|
/* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2", children: [
|
|
995
|
-
/* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onPageChange?.(page - 1), disabled: page <= 1, className: "p-2 rounded-lg border border-
|
|
967
|
+
/* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onPageChange?.(page - 1), disabled: page <= 1, className: "p-2 rounded-lg border border-[var(--border-subtle)] hover:bg-[var(--depth-3)] transition-colors disabled:opacity-30", children: /* @__PURE__ */ jsx10(ChevronLeft, { className: "h-4 w-4" }) }),
|
|
996
968
|
Array.from({ length: Math.min(totalPages, 5) }, (_, i) => i + 1).map((p) => /* @__PURE__ */ jsx10(
|
|
997
969
|
"button",
|
|
998
970
|
{
|
|
@@ -1000,63 +972,95 @@ function SandboxTable({
|
|
|
1000
972
|
onClick: () => onPageChange?.(p),
|
|
1001
973
|
className: cn(
|
|
1002
974
|
"px-3 py-1 rounded-lg transition-colors",
|
|
1003
|
-
p === page ? "bg-
|
|
975
|
+
p === page ? "bg-[var(--accent-surface-soft)] text-[var(--brand-cool)] border border-[var(--border-accent)]" : "hover:bg-[var(--depth-3)]"
|
|
1004
976
|
),
|
|
1005
977
|
children: p
|
|
1006
978
|
},
|
|
1007
979
|
p
|
|
1008
980
|
)),
|
|
1009
|
-
/* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onPageChange?.(page + 1), disabled: page >= totalPages, className: "p-2 rounded-lg border border-
|
|
981
|
+
/* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onPageChange?.(page + 1), disabled: page >= totalPages, className: "p-2 rounded-lg border border-[var(--border-subtle)] hover:bg-[var(--depth-3)] transition-colors disabled:opacity-30", children: /* @__PURE__ */ jsx10(ChevronRight, { className: "h-4 w-4" }) })
|
|
1010
982
|
] })
|
|
1011
983
|
] })
|
|
1012
984
|
] });
|
|
1013
985
|
}
|
|
1014
986
|
|
|
1015
987
|
// src/dashboard/backend-selector.tsx
|
|
988
|
+
import { ChevronDown } from "lucide-react";
|
|
989
|
+
import * as Select from "@radix-ui/react-select";
|
|
1016
990
|
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1017
991
|
function BackendSelector({
|
|
1018
992
|
backends,
|
|
1019
993
|
selected,
|
|
1020
994
|
onChange,
|
|
1021
|
-
label = "
|
|
1022
|
-
|
|
1023
|
-
multiSelect = true,
|
|
995
|
+
label = "Model",
|
|
996
|
+
placeholder = "Select a model",
|
|
1024
997
|
className
|
|
1025
998
|
}) {
|
|
1026
|
-
const
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
onChange([type]);
|
|
1033
|
-
}
|
|
1034
|
-
};
|
|
1035
|
-
return /* @__PURE__ */ jsxs10("div", { className, children: [
|
|
1036
|
-
/* @__PURE__ */ jsxs10("label", { className: "mb-2 block font-medium text-sm", children: [
|
|
1037
|
-
label,
|
|
1038
|
-
multiSelect && /* @__PURE__ */ jsx11("span", { className: "ml-2 font-normal text-muted-foreground", children: "(select multiple to compare)" })
|
|
1039
|
-
] }),
|
|
1040
|
-
/* @__PURE__ */ jsx11("div", { className: "flex flex-wrap gap-2", children: backends.map((backend) => {
|
|
1041
|
-
const isSelected = selected.includes(backend.type);
|
|
1042
|
-
return /* @__PURE__ */ jsx11(
|
|
1043
|
-
"button",
|
|
999
|
+
const current = backends.find((b) => b.type === selected);
|
|
1000
|
+
return /* @__PURE__ */ jsxs10("div", { className: cn("space-y-1.5", className), children: [
|
|
1001
|
+
label && /* @__PURE__ */ jsx11("label", { className: "block text-xs font-medium text-[var(--text-muted)] uppercase tracking-[0.06em]", children: label }),
|
|
1002
|
+
/* @__PURE__ */ jsxs10(Select.Root, { value: selected, onValueChange: onChange, children: [
|
|
1003
|
+
/* @__PURE__ */ jsxs10(
|
|
1004
|
+
Select.Trigger,
|
|
1044
1005
|
{
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1006
|
+
className: cn(
|
|
1007
|
+
"flex w-full items-center justify-between gap-2 rounded-[var(--radius-md)]",
|
|
1008
|
+
"border border-[var(--border-default)] bg-[var(--bg-card)]",
|
|
1009
|
+
"px-3 py-2.5 text-sm text-left",
|
|
1010
|
+
"transition-colors duration-[var(--transition-fast)]",
|
|
1011
|
+
"hover:border-[var(--border-hover)] hover:bg-[var(--bg-hover)]/30",
|
|
1012
|
+
"focus:outline-none focus:border-[var(--border-accent)]",
|
|
1013
|
+
"data-[state=open]:border-[var(--border-accent)] data-[state=open]:bg-[var(--bg-hover)]/30"
|
|
1014
|
+
),
|
|
1015
|
+
children: [
|
|
1016
|
+
/* @__PURE__ */ jsx11("div", { className: "min-w-0 flex-1", children: current ? /* @__PURE__ */ jsxs10("div", { children: [
|
|
1017
|
+
/* @__PURE__ */ jsx11("span", { className: "font-medium text-[var(--text-primary)]", children: current.label }),
|
|
1018
|
+
current.description && /* @__PURE__ */ jsx11("span", { className: "ml-2 text-xs text-[var(--text-muted)]", children: current.description })
|
|
1019
|
+
] }) : /* @__PURE__ */ jsx11("span", { className: "text-[var(--text-muted)]", children: placeholder }) }),
|
|
1020
|
+
/* @__PURE__ */ jsx11(Select.Icon, { asChild: true, children: /* @__PURE__ */ jsx11(ChevronDown, { className: "h-4 w-4 shrink-0 text-[var(--text-muted)] transition-transform duration-[var(--transition-fast)] data-[state=open]:rotate-180" }) })
|
|
1021
|
+
]
|
|
1022
|
+
}
|
|
1023
|
+
),
|
|
1024
|
+
/* @__PURE__ */ jsx11(Select.Portal, { children: /* @__PURE__ */ jsx11(
|
|
1025
|
+
Select.Content,
|
|
1026
|
+
{
|
|
1027
|
+
position: "popper",
|
|
1028
|
+
sideOffset: 4,
|
|
1029
|
+
className: cn(
|
|
1030
|
+
"z-50 w-[var(--radix-select-trigger-width)] overflow-hidden",
|
|
1031
|
+
"rounded-[var(--radius-md)] border border-[var(--border-default)]",
|
|
1032
|
+
"bg-[var(--bg-card)] shadow-[var(--shadow-dropdown)]",
|
|
1033
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
1034
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1035
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
1036
|
+
"data-[side=bottom]:slide-in-from-top-1"
|
|
1037
|
+
),
|
|
1038
|
+
children: /* @__PURE__ */ jsx11(Select.Viewport, { className: "p-1", children: backends.map((backend) => /* @__PURE__ */ jsxs10(
|
|
1039
|
+
Select.Item,
|
|
1040
|
+
{
|
|
1041
|
+
value: backend.type,
|
|
1042
|
+
className: cn(
|
|
1043
|
+
"relative flex cursor-pointer select-none flex-col rounded-[var(--radius-sm)]",
|
|
1044
|
+
"px-3 py-2.5 text-sm outline-none",
|
|
1045
|
+
"transition-colors duration-[var(--transition-fast)]",
|
|
1046
|
+
"hover:bg-[var(--bg-hover)]/50 focus:bg-[var(--bg-hover)]/50",
|
|
1047
|
+
"data-[state=checked]:bg-[var(--accent-surface-soft)] data-[state=checked]:text-[var(--brand-primary)]"
|
|
1048
|
+
),
|
|
1049
|
+
children: [
|
|
1050
|
+
/* @__PURE__ */ jsx11(Select.ItemText, { children: /* @__PURE__ */ jsx11("span", { className: "font-medium", children: backend.label }) }),
|
|
1051
|
+
backend.description && /* @__PURE__ */ jsx11("span", { className: "mt-0.5 text-xs text-[var(--text-muted)] data-[state=checked]:text-[var(--accent-text)]", children: backend.description })
|
|
1052
|
+
]
|
|
1053
|
+
},
|
|
1054
|
+
backend.type
|
|
1055
|
+
)) })
|
|
1056
|
+
}
|
|
1057
|
+
) })
|
|
1058
|
+
] })
|
|
1055
1059
|
] });
|
|
1056
1060
|
}
|
|
1057
1061
|
|
|
1058
1062
|
// src/dashboard/profile-selector.tsx
|
|
1059
|
-
import { Check, ChevronDown, Plus, Settings } from "lucide-react";
|
|
1063
|
+
import { Check as Check2, ChevronDown as ChevronDown2, Plus as Plus3, Settings } from "lucide-react";
|
|
1060
1064
|
import { Fragment as Fragment5, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1061
1065
|
function ProfileSelector({
|
|
1062
1066
|
profiles,
|
|
@@ -1077,7 +1081,7 @@ function ProfileSelector({
|
|
|
1077
1081
|
/* @__PURE__ */ jsxs11(DropdownMenu, { children: [
|
|
1078
1082
|
/* @__PURE__ */ jsx12(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs11(Button, { variant: "outline", className: "w-full justify-between", children: [
|
|
1079
1083
|
/* @__PURE__ */ jsx12("span", { className: "truncate", children: selected ? selected.name : placeholder }),
|
|
1080
|
-
/* @__PURE__ */ jsx12(
|
|
1084
|
+
/* @__PURE__ */ jsx12(ChevronDown2, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
1081
1085
|
] }) }),
|
|
1082
1086
|
/* @__PURE__ */ jsxs11(DropdownMenuContent, { className: "w-[300px]", align: "start", children: [
|
|
1083
1087
|
/* @__PURE__ */ jsxs11(
|
|
@@ -1087,7 +1091,7 @@ function ProfileSelector({
|
|
|
1087
1091
|
className: "flex items-center justify-between",
|
|
1088
1092
|
children: [
|
|
1089
1093
|
/* @__PURE__ */ jsx12("span", { children: placeholder }),
|
|
1090
|
-
!selectedId && /* @__PURE__ */ jsx12(
|
|
1094
|
+
!selectedId && /* @__PURE__ */ jsx12(Check2, { className: "h-4 w-4 text-[var(--surface-success-text)]" })
|
|
1091
1095
|
]
|
|
1092
1096
|
}
|
|
1093
1097
|
),
|
|
@@ -1108,7 +1112,7 @@ function ProfileSelector({
|
|
|
1108
1112
|
profile.extends
|
|
1109
1113
|
] })
|
|
1110
1114
|
] }),
|
|
1111
|
-
selectedId === profile.id && /* @__PURE__ */ jsx12(
|
|
1115
|
+
selectedId === profile.id && /* @__PURE__ */ jsx12(Check2, { className: "h-4 w-4 text-[var(--surface-success-text)]" })
|
|
1112
1116
|
] }),
|
|
1113
1117
|
profile.description && /* @__PURE__ */ jsx12("span", { className: "line-clamp-1 text-muted-foreground text-xs", children: profile.description })
|
|
1114
1118
|
]
|
|
@@ -1130,7 +1134,7 @@ function ProfileSelector({
|
|
|
1130
1134
|
/* @__PURE__ */ jsx12("span", { className: "font-medium", children: profile.name }),
|
|
1131
1135
|
profile.model && /* @__PURE__ */ jsx12(Badge, { variant: "secondary", className: "border-0 text-xs", children: profile.model.split("/").pop() })
|
|
1132
1136
|
] }),
|
|
1133
|
-
selectedId === profile.id && /* @__PURE__ */ jsx12(
|
|
1137
|
+
selectedId === profile.id && /* @__PURE__ */ jsx12(Check2, { className: "h-4 w-4 text-[var(--surface-success-text)]" })
|
|
1134
1138
|
] }),
|
|
1135
1139
|
profile.description && /* @__PURE__ */ jsx12("span", { className: "line-clamp-1 text-muted-foreground text-xs", children: profile.description }),
|
|
1136
1140
|
showMetrics && profile.metrics && profile.metrics.total_runs > 0 && /* @__PURE__ */ jsxs11("div", { className: "flex gap-3 text-muted-foreground text-xs", children: [
|
|
@@ -1159,9 +1163,9 @@ function ProfileSelector({
|
|
|
1159
1163
|
DropdownMenuItem,
|
|
1160
1164
|
{
|
|
1161
1165
|
onClick: onCreateClick,
|
|
1162
|
-
className: "text-
|
|
1166
|
+
className: "text-[var(--surface-info-text)]",
|
|
1163
1167
|
children: [
|
|
1164
|
-
/* @__PURE__ */ jsx12(
|
|
1168
|
+
/* @__PURE__ */ jsx12(Plus3, { className: "mr-2 h-4 w-4" }),
|
|
1165
1169
|
"Create New Profile"
|
|
1166
1170
|
]
|
|
1167
1171
|
}
|
|
@@ -1210,8 +1214,8 @@ function ProfileComparison({
|
|
|
1210
1214
|
children: [
|
|
1211
1215
|
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2", children: [
|
|
1212
1216
|
/* @__PURE__ */ jsx12("span", { className: "font-medium", children: profile.name }),
|
|
1213
|
-
isBestSuccess && /* @__PURE__ */ jsx12(Badge, { className: "border-
|
|
1214
|
-
isFastest && !isBestSuccess && /* @__PURE__ */ jsx12(Badge, { className: "border-
|
|
1217
|
+
isBestSuccess && /* @__PURE__ */ jsx12(Badge, { className: "border border-[var(--surface-success-border)] bg-[var(--surface-success-bg)] text-[var(--surface-success-text)] text-xs", children: "Best Success" }),
|
|
1218
|
+
isFastest && !isBestSuccess && /* @__PURE__ */ jsx12(Badge, { className: "border border-[var(--surface-info-border)] bg-[var(--surface-info-bg)] text-[var(--surface-info-text)] text-xs", children: "Fastest" })
|
|
1215
1219
|
] }),
|
|
1216
1220
|
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-4 text-sm", children: [
|
|
1217
1221
|
/* @__PURE__ */ jsxs11("span", { children: [
|
|
@@ -1220,7 +1224,7 @@ function ProfileComparison({
|
|
|
1220
1224
|
/* @__PURE__ */ jsxs11(
|
|
1221
1225
|
"span",
|
|
1222
1226
|
{
|
|
1223
|
-
className: (profile.metrics?.success_rate ?? 0) >= 80 ? "text-
|
|
1227
|
+
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)]",
|
|
1224
1228
|
children: [
|
|
1225
1229
|
profile.metrics?.success_rate.toFixed(0),
|
|
1226
1230
|
"%"
|
|
@@ -1249,10 +1253,10 @@ function ProfileComparison({
|
|
|
1249
1253
|
|
|
1250
1254
|
// src/dashboard/variant-list.tsx
|
|
1251
1255
|
import {
|
|
1252
|
-
Check as
|
|
1256
|
+
Check as Check3,
|
|
1253
1257
|
CheckCircle2,
|
|
1254
1258
|
Clock,
|
|
1255
|
-
ExternalLink,
|
|
1259
|
+
ExternalLink as ExternalLink2,
|
|
1256
1260
|
Loader2,
|
|
1257
1261
|
Timer,
|
|
1258
1262
|
X,
|
|
@@ -1262,64 +1266,74 @@ import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
|
1262
1266
|
var statusConfig2 = {
|
|
1263
1267
|
pending: {
|
|
1264
1268
|
icon: Clock,
|
|
1265
|
-
color: "text-
|
|
1266
|
-
bg: "bg-
|
|
1269
|
+
color: "text-[var(--surface-warning-text)]",
|
|
1270
|
+
bg: "bg-[var(--surface-warning-bg)]",
|
|
1271
|
+
border: "border-[var(--surface-warning-border)]",
|
|
1267
1272
|
label: "Pending",
|
|
1268
1273
|
animate: false
|
|
1269
1274
|
},
|
|
1270
1275
|
running: {
|
|
1271
1276
|
icon: Loader2,
|
|
1272
|
-
color: "text-
|
|
1273
|
-
bg: "bg-
|
|
1277
|
+
color: "text-[var(--brand-cool)]",
|
|
1278
|
+
bg: "bg-[var(--accent-surface-soft)]",
|
|
1279
|
+
border: "border-[var(--border-accent)]",
|
|
1274
1280
|
label: "Running",
|
|
1275
1281
|
animate: true
|
|
1276
1282
|
},
|
|
1277
1283
|
completed: {
|
|
1278
1284
|
icon: CheckCircle2,
|
|
1279
|
-
color: "text-
|
|
1280
|
-
bg: "bg-
|
|
1285
|
+
color: "text-[var(--surface-success-text)]",
|
|
1286
|
+
bg: "bg-[var(--surface-success-bg)]",
|
|
1287
|
+
border: "border-[var(--surface-success-border)]",
|
|
1281
1288
|
label: "Completed",
|
|
1282
1289
|
animate: false
|
|
1283
1290
|
},
|
|
1284
1291
|
failed: {
|
|
1285
1292
|
icon: XCircle,
|
|
1286
|
-
color: "text-
|
|
1287
|
-
bg: "bg-
|
|
1293
|
+
color: "text-[var(--surface-danger-text)]",
|
|
1294
|
+
bg: "bg-[var(--surface-danger-bg)]",
|
|
1295
|
+
border: "border-[var(--surface-danger-border)]",
|
|
1288
1296
|
label: "Failed",
|
|
1289
1297
|
animate: false
|
|
1290
1298
|
},
|
|
1291
1299
|
cancelled: {
|
|
1292
1300
|
icon: XCircle,
|
|
1293
|
-
color: "text-
|
|
1294
|
-
bg: "bg-
|
|
1301
|
+
color: "text-[var(--surface-neutral-text)]",
|
|
1302
|
+
bg: "bg-[var(--surface-neutral-bg)]",
|
|
1303
|
+
border: "border-[var(--surface-neutral-border)]",
|
|
1295
1304
|
label: "Cancelled",
|
|
1296
1305
|
animate: false
|
|
1297
1306
|
}
|
|
1298
1307
|
};
|
|
1299
1308
|
var outcomeConfig = {
|
|
1300
1309
|
pending_review: {
|
|
1301
|
-
color: "text-
|
|
1302
|
-
bg: "bg-
|
|
1310
|
+
color: "text-[var(--surface-warning-text)]",
|
|
1311
|
+
bg: "bg-[var(--surface-warning-bg)]",
|
|
1312
|
+
border: "border-[var(--surface-warning-border)]",
|
|
1303
1313
|
label: "Pending Review"
|
|
1304
1314
|
},
|
|
1305
1315
|
accepted: {
|
|
1306
|
-
color: "text-
|
|
1307
|
-
bg: "bg-
|
|
1316
|
+
color: "text-[var(--surface-success-text)]",
|
|
1317
|
+
bg: "bg-[var(--surface-success-bg)]",
|
|
1318
|
+
border: "border-[var(--surface-success-border)]",
|
|
1308
1319
|
label: "Accepted"
|
|
1309
1320
|
},
|
|
1310
1321
|
rejected: {
|
|
1311
|
-
color: "text-
|
|
1312
|
-
bg: "bg-
|
|
1322
|
+
color: "text-[var(--surface-danger-text)]",
|
|
1323
|
+
bg: "bg-[var(--surface-danger-bg)]",
|
|
1324
|
+
border: "border-[var(--surface-danger-border)]",
|
|
1313
1325
|
label: "Rejected"
|
|
1314
1326
|
},
|
|
1315
1327
|
merged_with_conflicts: {
|
|
1316
|
-
color: "text-orange-
|
|
1317
|
-
bg: "bg-orange-
|
|
1328
|
+
color: "text-[var(--surface-orange-text)]",
|
|
1329
|
+
bg: "bg-[var(--surface-orange-bg)]",
|
|
1330
|
+
border: "border-[var(--surface-orange-border)]",
|
|
1318
1331
|
label: "Merged (conflicts)"
|
|
1319
1332
|
},
|
|
1320
1333
|
expired: {
|
|
1321
|
-
color: "text-
|
|
1322
|
-
bg: "bg-
|
|
1334
|
+
color: "text-[var(--surface-neutral-text)]",
|
|
1335
|
+
bg: "bg-[var(--surface-neutral-bg)]",
|
|
1336
|
+
border: "border-[var(--surface-neutral-border)]",
|
|
1323
1337
|
label: "Expired"
|
|
1324
1338
|
}
|
|
1325
1339
|
};
|
|
@@ -1339,12 +1353,12 @@ function VariantList({
|
|
|
1339
1353
|
return /* @__PURE__ */ jsxs12(
|
|
1340
1354
|
"div",
|
|
1341
1355
|
{
|
|
1342
|
-
className: `cursor-pointer rounded-lg border p-4 transition-colors ${isSelected ? "border-
|
|
1356
|
+
className: `cursor-pointer rounded-lg border p-4 transition-colors ${isSelected ? "border-[var(--border-accent)] bg-[var(--accent-surface-soft)]" : "border-[var(--border-subtle)] bg-[var(--depth-2)] hover:border-[var(--border-default)] hover:bg-[var(--depth-3)]"}`,
|
|
1343
1357
|
onClick: () => onSelect?.(variant.id),
|
|
1344
1358
|
children: [
|
|
1345
1359
|
/* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-between", children: [
|
|
1346
1360
|
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-3", children: [
|
|
1347
|
-
/* @__PURE__ */ jsxs12(Badge, { className: `${status.bg} ${status.color}
|
|
1361
|
+
/* @__PURE__ */ jsxs12(Badge, { className: `${status.bg} ${status.border} ${status.color}`, children: [
|
|
1348
1362
|
/* @__PURE__ */ jsx13(
|
|
1349
1363
|
StatusIcon,
|
|
1350
1364
|
{
|
|
@@ -1353,13 +1367,13 @@ function VariantList({
|
|
|
1353
1367
|
),
|
|
1354
1368
|
status.label
|
|
1355
1369
|
] }),
|
|
1356
|
-
/* @__PURE__ */ jsx13("span", { className: "font-medium", children: variant.label }),
|
|
1357
|
-
variant.sublabel && /* @__PURE__ */ jsxs12("span", { className: "text-
|
|
1370
|
+
/* @__PURE__ */ jsx13("span", { className: "font-medium text-[var(--text-primary)]", children: variant.label }),
|
|
1371
|
+
variant.sublabel && /* @__PURE__ */ jsxs12("span", { className: "text-sm text-[var(--text-muted)]", children: [
|
|
1358
1372
|
"(",
|
|
1359
1373
|
variant.sublabel,
|
|
1360
1374
|
")"
|
|
1361
1375
|
] }),
|
|
1362
|
-
variant.durationMs && /* @__PURE__ */ jsxs12("span", { className: "flex items-center gap-1 text-
|
|
1376
|
+
variant.durationMs && /* @__PURE__ */ jsxs12("span", { className: "flex items-center gap-1 text-sm text-[var(--text-muted)]", children: [
|
|
1363
1377
|
/* @__PURE__ */ jsx13(Timer, { className: "h-3 w-3" }),
|
|
1364
1378
|
(variant.durationMs / 1e3).toFixed(2),
|
|
1365
1379
|
"s"
|
|
@@ -1369,7 +1383,7 @@ function VariantList({
|
|
|
1369
1383
|
variant.outcome && /* @__PURE__ */ jsx13(
|
|
1370
1384
|
Badge,
|
|
1371
1385
|
{
|
|
1372
|
-
className: `${outcomeConfig[variant.outcome].bg} ${outcomeConfig[variant.outcome].color}
|
|
1386
|
+
className: `${outcomeConfig[variant.outcome].bg} ${outcomeConfig[variant.outcome].border} ${outcomeConfig[variant.outcome].color}`,
|
|
1373
1387
|
children: outcomeConfig[variant.outcome].label
|
|
1374
1388
|
}
|
|
1375
1389
|
),
|
|
@@ -1379,14 +1393,14 @@ function VariantList({
|
|
|
1379
1393
|
{
|
|
1380
1394
|
variant: "outline",
|
|
1381
1395
|
size: "sm",
|
|
1382
|
-
className: "text-
|
|
1396
|
+
className: "border-[var(--surface-success-border)] bg-[var(--surface-success-bg)] text-[var(--surface-success-text)] hover:bg-[var(--surface-success-border)]",
|
|
1383
1397
|
onClick: (e) => {
|
|
1384
1398
|
e.stopPropagation();
|
|
1385
1399
|
onAccept(variant.id);
|
|
1386
1400
|
},
|
|
1387
1401
|
disabled: isActioning === variant.id,
|
|
1388
1402
|
children: [
|
|
1389
|
-
/* @__PURE__ */ jsx13(
|
|
1403
|
+
/* @__PURE__ */ jsx13(Check3, { className: "mr-1 h-4 w-4" }),
|
|
1390
1404
|
"Accept"
|
|
1391
1405
|
]
|
|
1392
1406
|
}
|
|
@@ -1396,7 +1410,7 @@ function VariantList({
|
|
|
1396
1410
|
{
|
|
1397
1411
|
variant: "outline",
|
|
1398
1412
|
size: "sm",
|
|
1399
|
-
className: "text-
|
|
1413
|
+
className: "border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] text-[var(--surface-danger-text)] hover:bg-[var(--surface-danger-border)]",
|
|
1400
1414
|
onClick: (e) => {
|
|
1401
1415
|
e.stopPropagation();
|
|
1402
1416
|
onReject(variant.id);
|
|
@@ -1414,18 +1428,18 @@ function VariantList({
|
|
|
1414
1428
|
{
|
|
1415
1429
|
variant: "ghost",
|
|
1416
1430
|
size: "sm",
|
|
1417
|
-
className: "text-muted-
|
|
1431
|
+
className: "text-[var(--text-muted)] hover:text-[var(--text-primary)]",
|
|
1418
1432
|
onClick: (e) => {
|
|
1419
1433
|
e.stopPropagation();
|
|
1420
1434
|
window.open(variant.detailsUrl, "_blank");
|
|
1421
1435
|
},
|
|
1422
|
-
children: /* @__PURE__ */ jsx13(
|
|
1436
|
+
children: /* @__PURE__ */ jsx13(ExternalLink2, { className: "h-4 w-4" })
|
|
1423
1437
|
}
|
|
1424
1438
|
)
|
|
1425
1439
|
] })
|
|
1426
1440
|
] }),
|
|
1427
|
-
variant.error && /* @__PURE__ */ jsx13("p", { className: "mt-2 text-
|
|
1428
|
-
variant.summary && /* @__PURE__ */ jsx13("p", { className: "mt-2 line-clamp-2 text-
|
|
1441
|
+
variant.error && /* @__PURE__ */ jsx13("p", { className: "mt-2 text-sm text-[var(--surface-danger-text)]", children: variant.error }),
|
|
1442
|
+
variant.summary && /* @__PURE__ */ jsx13("p", { className: "mt-2 line-clamp-2 text-sm text-[var(--text-muted)]", children: variant.summary })
|
|
1429
1443
|
]
|
|
1430
1444
|
},
|
|
1431
1445
|
variant.id
|