@tangle-network/sandbox-ui 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/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-MVYFNPAH.js → chunk-7DVFZEVW.js} +298 -272
- 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/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-BT_-ecpc.d.ts} +11 -10
- 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, Trash2 } 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-
|
|
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" }
|
|
754
734
|
};
|
|
755
|
-
|
|
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"
|
|
759
|
-
};
|
|
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
|
-
function SandboxCard({ sandbox, onOpenIDE, onOpenTerminal, onWake, onRestore, className }) {
|
|
735
|
+
function SandboxCard({ sandbox, onOpenIDE, onOpenTerminal, onWake, onRestore, onDelete, 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,9 +841,19 @@ 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
|
}
|
|
847
|
+
),
|
|
848
|
+
onDelete && !isProvisioning && /* @__PURE__ */ jsx9(
|
|
849
|
+
"button",
|
|
850
|
+
{
|
|
851
|
+
type: "button",
|
|
852
|
+
onClick: () => onDelete(sandbox.id),
|
|
853
|
+
className: "absolute bottom-4 right-4 p-1.5 rounded-md text-[var(--text-muted)] hover:text-[var(--surface-danger-text)] hover:bg-[var(--surface-danger-bg)] transition-all opacity-0 group-hover:opacity-100",
|
|
854
|
+
title: "Delete sandbox",
|
|
855
|
+
children: /* @__PURE__ */ jsx9(Trash2, { className: "h-3.5 w-3.5" })
|
|
856
|
+
}
|
|
873
857
|
)
|
|
874
858
|
]
|
|
875
859
|
}
|
|
@@ -882,41 +866,39 @@ function NewSandboxCard({ onClick, className }) {
|
|
|
882
866
|
type: "button",
|
|
883
867
|
onClick,
|
|
884
868
|
className: cn(
|
|
885
|
-
"border-2 border-dashed border-
|
|
869
|
+
"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
870
|
className
|
|
887
871
|
),
|
|
888
872
|
children: [
|
|
889
|
-
/* @__PURE__ */ jsx9("div", { className: "w-
|
|
890
|
-
/* @__PURE__ */ jsx9("h4", { className: "font-bold text-
|
|
891
|
-
/* @__PURE__ */ jsx9("p", { className: "text-xs text-
|
|
873
|
+
/* @__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" }) }),
|
|
874
|
+
/* @__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" }),
|
|
875
|
+
/* @__PURE__ */ jsx9("p", { className: "text-xs text-[var(--text-muted)]", children: "Instantiate a fresh compute node" })
|
|
892
876
|
]
|
|
893
877
|
}
|
|
894
878
|
);
|
|
895
879
|
}
|
|
896
880
|
|
|
897
881
|
// src/dashboard/sandbox-table.tsx
|
|
882
|
+
import { Terminal as Terminal2, Code2, Key, Trash2 as Trash22, RefreshCw as RefreshCw2, ChevronLeft, ChevronRight } from "lucide-react";
|
|
898
883
|
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
884
|
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-
|
|
885
|
+
running: { dot: "bg-[var(--code-success)] animate-pulse", text: "text-[var(--code-success)]", bar: "bg-[var(--code-success)]" },
|
|
886
|
+
hibernating: { dot: "bg-[var(--text-muted)]", text: "text-[var(--text-muted)]", bar: "bg-[var(--text-muted)]" },
|
|
887
|
+
provisioning: { dot: "bg-[var(--brand-cool)] animate-pulse", text: "text-[var(--brand-cool)]", bar: "bg-[var(--brand-cool)]" },
|
|
888
|
+
stopped: { dot: "bg-[var(--text-muted)]", text: "text-[var(--text-secondary)]", bar: "bg-[var(--text-muted)]" },
|
|
889
|
+
failed: { dot: "bg-[var(--code-error)]", text: "text-[var(--code-error)]", bar: "bg-[var(--code-error)]" },
|
|
890
|
+
archived: { dot: "bg-[var(--border-default)]", text: "text-[var(--text-muted)]", bar: "bg-[var(--border-default)]" }
|
|
909
891
|
};
|
|
910
892
|
function MiniMeter({ label, percent, className }) {
|
|
911
893
|
return /* @__PURE__ */ jsxs9("div", { className: cn("space-y-1", className), children: [
|
|
912
|
-
/* @__PURE__ */ jsxs9("div", { className: "flex justify-between text-[10px] font-mono text-
|
|
894
|
+
/* @__PURE__ */ jsxs9("div", { className: "flex justify-between text-[10px] font-mono text-[var(--text-muted)]", children: [
|
|
913
895
|
/* @__PURE__ */ jsx10("span", { className: "font-bold", children: label }),
|
|
914
|
-
/* @__PURE__ */ jsxs9("span", { className: "text-
|
|
896
|
+
/* @__PURE__ */ jsxs9("span", { className: "text-[var(--brand-cool)]", children: [
|
|
915
897
|
percent,
|
|
916
898
|
"%"
|
|
917
899
|
] })
|
|
918
900
|
] }),
|
|
919
|
-
/* @__PURE__ */ jsx10("div", { className: "h-1.5 w-full bg-
|
|
901
|
+
/* @__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
902
|
] });
|
|
921
903
|
}
|
|
922
904
|
function SandboxTable({
|
|
@@ -930,42 +912,43 @@ function SandboxTable({
|
|
|
930
912
|
onSSH,
|
|
931
913
|
onWake,
|
|
932
914
|
onMore,
|
|
915
|
+
onDelete,
|
|
933
916
|
className
|
|
934
917
|
}) {
|
|
935
918
|
const totalCount = total ?? sandboxes.length;
|
|
936
919
|
const totalPages = Math.ceil(totalCount / pageSize);
|
|
937
920
|
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-
|
|
921
|
+
/* @__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: [
|
|
922
|
+
/* @__PURE__ */ jsx10("thead", { children: /* @__PURE__ */ jsxs9("tr", { className: "bg-[var(--depth-1)] border-b border-[var(--border-subtle)]", children: [
|
|
923
|
+
/* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-[var(--text-muted)] uppercase tracking-wider", children: "Status" }),
|
|
924
|
+
/* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-[var(--text-muted)] uppercase tracking-wider", children: "Sandbox Name" }),
|
|
925
|
+
/* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-[var(--text-muted)] uppercase tracking-wider", children: "Environment" }),
|
|
926
|
+
/* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-[var(--text-muted)] uppercase tracking-wider", children: "Resources" }),
|
|
927
|
+
/* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-[var(--text-muted)] uppercase tracking-wider text-right", children: "Actions" })
|
|
945
928
|
] }) }),
|
|
946
|
-
/* @__PURE__ */ jsx10("tbody", { className: "divide-y divide-
|
|
929
|
+
/* @__PURE__ */ jsx10("tbody", { className: "divide-y divide-[var(--border-subtle)]", children: sandboxes.map((sb) => {
|
|
947
930
|
const sc = statusColors[sb.status] ?? statusColors.stopped;
|
|
948
931
|
const isActive = sb.status === "running";
|
|
949
932
|
const isHibernating = sb.status === "hibernating";
|
|
950
933
|
const isProvisioning = sb.status === "provisioning";
|
|
951
|
-
return /* @__PURE__ */ jsxs9("tr", { className: "hover:bg-
|
|
934
|
+
return /* @__PURE__ */ jsxs9("tr", { className: "hover:bg-[var(--depth-3)] transition-colors group relative", children: [
|
|
952
935
|
/* @__PURE__ */ jsx10("td", { className: "px-6 py-5 whitespace-nowrap", children: /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2", children: [
|
|
953
936
|
/* @__PURE__ */ jsx10("span", { className: cn("flex h-2.5 w-2.5 rounded-full", sc.dot) }),
|
|
954
937
|
/* @__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
938
|
] }) }),
|
|
956
939
|
/* @__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-
|
|
940
|
+
/* @__PURE__ */ jsx10("span", { className: "text-sm font-bold text-[var(--text-primary)] group-hover:text-[var(--brand-cool)] transition-colors", children: sb.name }),
|
|
941
|
+
sb.nodeId && /* @__PURE__ */ jsx10("span", { className: "text-[10px] font-mono text-[var(--text-muted)]", children: sb.nodeId })
|
|
959
942
|
] }) }),
|
|
960
943
|
/* @__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-
|
|
944
|
+
sb.imageIcon && /* @__PURE__ */ jsx10("div", { className: "w-8 h-8 rounded-lg bg-[var(--depth-3)] flex items-center justify-center", children: sb.imageIcon }),
|
|
945
|
+
sb.image && /* @__PURE__ */ jsx10("span", { className: "text-xs font-bold text-[var(--text-primary)]", children: sb.image })
|
|
963
946
|
] }) }),
|
|
964
947
|
/* @__PURE__ */ jsx10("td", { className: "px-6 py-5", children: isActive ? /* @__PURE__ */ jsxs9("div", { className: "space-y-3 w-48", children: [
|
|
965
948
|
/* @__PURE__ */ jsx10(MiniMeter, { label: "CPU", percent: sb.cpuPercent ?? 0 }),
|
|
966
949
|
/* @__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(
|
|
950
|
+
] }) : isProvisioning ? /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-2 text-[var(--brand-cool)] italic text-[10px] font-bold", children: [
|
|
951
|
+
/* @__PURE__ */ jsx10(RefreshCw2, { className: "h-3.5 w-3.5 animate-spin" }),
|
|
969
952
|
sb.provisioningMessage ?? "Allocating nodes..."
|
|
970
953
|
] }) : isHibernating ? /* @__PURE__ */ jsxs9("div", { className: "space-y-3 w-48 opacity-30", children: [
|
|
971
954
|
/* @__PURE__ */ jsx10(MiniMeter, { label: "CPU", percent: 0 }),
|
|
@@ -973,17 +956,18 @@ function SandboxTable({
|
|
|
973
956
|
] }) : null }),
|
|
974
957
|
/* @__PURE__ */ jsx10("td", { className: "px-6 py-5 text-right", children: /* @__PURE__ */ jsxs9("div", { className: "flex items-center justify-end gap-1", children: [
|
|
975
958
|
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-
|
|
959
|
+
/* @__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" }) }),
|
|
960
|
+
/* @__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" }) }),
|
|
961
|
+
/* @__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
962
|
] }),
|
|
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
|
|
963
|
+
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" }),
|
|
964
|
+
onMore && /* @__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(Code2, { className: "h-4 w-4" }) }),
|
|
965
|
+
onDelete && /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onDelete(sb.id), className: "p-2 rounded-lg hover:bg-[var(--surface-danger-bg)] text-[var(--text-muted)] hover:text-[var(--surface-danger-text)] transition-all active:scale-90", title: "Delete", children: /* @__PURE__ */ jsx10(Trash22, { className: "h-4 w-4" }) })
|
|
982
966
|
] }) })
|
|
983
967
|
] }, sb.id);
|
|
984
968
|
}) })
|
|
985
969
|
] }) }) }),
|
|
986
|
-
totalPages > 1 && /* @__PURE__ */ jsxs9("div", { className: "mt-6 flex flex-col md:flex-row justify-between items-center text-
|
|
970
|
+
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
971
|
/* @__PURE__ */ jsxs9("p", { children: [
|
|
988
972
|
"Showing ",
|
|
989
973
|
sandboxes.length,
|
|
@@ -992,7 +976,7 @@ function SandboxTable({
|
|
|
992
976
|
" active sandboxes"
|
|
993
977
|
] }),
|
|
994
978
|
/* @__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-
|
|
979
|
+
/* @__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
980
|
Array.from({ length: Math.min(totalPages, 5) }, (_, i) => i + 1).map((p) => /* @__PURE__ */ jsx10(
|
|
997
981
|
"button",
|
|
998
982
|
{
|
|
@@ -1000,63 +984,95 @@ function SandboxTable({
|
|
|
1000
984
|
onClick: () => onPageChange?.(p),
|
|
1001
985
|
className: cn(
|
|
1002
986
|
"px-3 py-1 rounded-lg transition-colors",
|
|
1003
|
-
p === page ? "bg-
|
|
987
|
+
p === page ? "bg-[var(--accent-surface-soft)] text-[var(--brand-cool)] border border-[var(--border-accent)]" : "hover:bg-[var(--depth-3)]"
|
|
1004
988
|
),
|
|
1005
989
|
children: p
|
|
1006
990
|
},
|
|
1007
991
|
p
|
|
1008
992
|
)),
|
|
1009
|
-
/* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onPageChange?.(page + 1), disabled: page >= totalPages, className: "p-2 rounded-lg border border-
|
|
993
|
+
/* @__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
994
|
] })
|
|
1011
995
|
] })
|
|
1012
996
|
] });
|
|
1013
997
|
}
|
|
1014
998
|
|
|
1015
999
|
// src/dashboard/backend-selector.tsx
|
|
1000
|
+
import { ChevronDown } from "lucide-react";
|
|
1001
|
+
import * as Select from "@radix-ui/react-select";
|
|
1016
1002
|
import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1017
1003
|
function BackendSelector({
|
|
1018
1004
|
backends,
|
|
1019
1005
|
selected,
|
|
1020
1006
|
onChange,
|
|
1021
|
-
label = "
|
|
1022
|
-
|
|
1023
|
-
multiSelect = true,
|
|
1007
|
+
label = "Model",
|
|
1008
|
+
placeholder = "Select a model",
|
|
1024
1009
|
className
|
|
1025
1010
|
}) {
|
|
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",
|
|
1011
|
+
const current = backends.find((b) => b.type === selected);
|
|
1012
|
+
return /* @__PURE__ */ jsxs10("div", { className: cn("space-y-1.5", className), children: [
|
|
1013
|
+
label && /* @__PURE__ */ jsx11("label", { className: "block text-xs font-medium text-[var(--text-muted)] uppercase tracking-[0.06em]", children: label }),
|
|
1014
|
+
/* @__PURE__ */ jsxs10(Select.Root, { value: selected, onValueChange: onChange, children: [
|
|
1015
|
+
/* @__PURE__ */ jsxs10(
|
|
1016
|
+
Select.Trigger,
|
|
1044
1017
|
{
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1018
|
+
className: cn(
|
|
1019
|
+
"flex w-full items-center justify-between gap-2 rounded-[var(--radius-md)]",
|
|
1020
|
+
"border border-[var(--border-default)] bg-[var(--bg-card)]",
|
|
1021
|
+
"px-3 py-2.5 text-sm text-left",
|
|
1022
|
+
"transition-colors duration-[var(--transition-fast)]",
|
|
1023
|
+
"hover:border-[var(--border-hover)] hover:bg-[var(--bg-hover)]/30",
|
|
1024
|
+
"focus:outline-none focus:border-[var(--border-accent)]",
|
|
1025
|
+
"data-[state=open]:border-[var(--border-accent)] data-[state=open]:bg-[var(--bg-hover)]/30"
|
|
1026
|
+
),
|
|
1027
|
+
children: [
|
|
1028
|
+
/* @__PURE__ */ jsx11("div", { className: "min-w-0 flex-1", children: current ? /* @__PURE__ */ jsxs10("div", { children: [
|
|
1029
|
+
/* @__PURE__ */ jsx11("span", { className: "font-medium text-[var(--text-primary)]", children: current.label }),
|
|
1030
|
+
current.description && /* @__PURE__ */ jsx11("span", { className: "ml-2 text-xs text-[var(--text-muted)]", children: current.description })
|
|
1031
|
+
] }) : /* @__PURE__ */ jsx11("span", { className: "text-[var(--text-muted)]", children: placeholder }) }),
|
|
1032
|
+
/* @__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" }) })
|
|
1033
|
+
]
|
|
1034
|
+
}
|
|
1035
|
+
),
|
|
1036
|
+
/* @__PURE__ */ jsx11(Select.Portal, { children: /* @__PURE__ */ jsx11(
|
|
1037
|
+
Select.Content,
|
|
1038
|
+
{
|
|
1039
|
+
position: "popper",
|
|
1040
|
+
sideOffset: 4,
|
|
1041
|
+
className: cn(
|
|
1042
|
+
"z-50 w-[var(--radix-select-trigger-width)] overflow-hidden",
|
|
1043
|
+
"rounded-[var(--radius-md)] border border-[var(--border-default)]",
|
|
1044
|
+
"bg-[var(--bg-card)] shadow-[var(--shadow-dropdown)]",
|
|
1045
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out",
|
|
1046
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
1047
|
+
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
1048
|
+
"data-[side=bottom]:slide-in-from-top-1"
|
|
1049
|
+
),
|
|
1050
|
+
children: /* @__PURE__ */ jsx11(Select.Viewport, { className: "p-1", children: backends.map((backend) => /* @__PURE__ */ jsxs10(
|
|
1051
|
+
Select.Item,
|
|
1052
|
+
{
|
|
1053
|
+
value: backend.type,
|
|
1054
|
+
className: cn(
|
|
1055
|
+
"relative flex cursor-pointer select-none flex-col rounded-[var(--radius-sm)]",
|
|
1056
|
+
"px-3 py-2.5 text-sm outline-none",
|
|
1057
|
+
"transition-colors duration-[var(--transition-fast)]",
|
|
1058
|
+
"hover:bg-[var(--bg-hover)]/50 focus:bg-[var(--bg-hover)]/50",
|
|
1059
|
+
"data-[state=checked]:bg-[var(--accent-surface-soft)] data-[state=checked]:text-[var(--brand-primary)]"
|
|
1060
|
+
),
|
|
1061
|
+
children: [
|
|
1062
|
+
/* @__PURE__ */ jsx11(Select.ItemText, { children: /* @__PURE__ */ jsx11("span", { className: "font-medium", children: backend.label }) }),
|
|
1063
|
+
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 })
|
|
1064
|
+
]
|
|
1065
|
+
},
|
|
1066
|
+
backend.type
|
|
1067
|
+
)) })
|
|
1068
|
+
}
|
|
1069
|
+
) })
|
|
1070
|
+
] })
|
|
1055
1071
|
] });
|
|
1056
1072
|
}
|
|
1057
1073
|
|
|
1058
1074
|
// src/dashboard/profile-selector.tsx
|
|
1059
|
-
import { Check, ChevronDown, Plus, Settings } from "lucide-react";
|
|
1075
|
+
import { Check as Check2, ChevronDown as ChevronDown2, Plus as Plus3, Settings } from "lucide-react";
|
|
1060
1076
|
import { Fragment as Fragment5, jsx as jsx12, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1061
1077
|
function ProfileSelector({
|
|
1062
1078
|
profiles,
|
|
@@ -1077,7 +1093,7 @@ function ProfileSelector({
|
|
|
1077
1093
|
/* @__PURE__ */ jsxs11(DropdownMenu, { children: [
|
|
1078
1094
|
/* @__PURE__ */ jsx12(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs11(Button, { variant: "outline", className: "w-full justify-between", children: [
|
|
1079
1095
|
/* @__PURE__ */ jsx12("span", { className: "truncate", children: selected ? selected.name : placeholder }),
|
|
1080
|
-
/* @__PURE__ */ jsx12(
|
|
1096
|
+
/* @__PURE__ */ jsx12(ChevronDown2, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
|
|
1081
1097
|
] }) }),
|
|
1082
1098
|
/* @__PURE__ */ jsxs11(DropdownMenuContent, { className: "w-[300px]", align: "start", children: [
|
|
1083
1099
|
/* @__PURE__ */ jsxs11(
|
|
@@ -1087,7 +1103,7 @@ function ProfileSelector({
|
|
|
1087
1103
|
className: "flex items-center justify-between",
|
|
1088
1104
|
children: [
|
|
1089
1105
|
/* @__PURE__ */ jsx12("span", { children: placeholder }),
|
|
1090
|
-
!selectedId && /* @__PURE__ */ jsx12(
|
|
1106
|
+
!selectedId && /* @__PURE__ */ jsx12(Check2, { className: "h-4 w-4 text-[var(--surface-success-text)]" })
|
|
1091
1107
|
]
|
|
1092
1108
|
}
|
|
1093
1109
|
),
|
|
@@ -1108,7 +1124,7 @@ function ProfileSelector({
|
|
|
1108
1124
|
profile.extends
|
|
1109
1125
|
] })
|
|
1110
1126
|
] }),
|
|
1111
|
-
selectedId === profile.id && /* @__PURE__ */ jsx12(
|
|
1127
|
+
selectedId === profile.id && /* @__PURE__ */ jsx12(Check2, { className: "h-4 w-4 text-[var(--surface-success-text)]" })
|
|
1112
1128
|
] }),
|
|
1113
1129
|
profile.description && /* @__PURE__ */ jsx12("span", { className: "line-clamp-1 text-muted-foreground text-xs", children: profile.description })
|
|
1114
1130
|
]
|
|
@@ -1130,7 +1146,7 @@ function ProfileSelector({
|
|
|
1130
1146
|
/* @__PURE__ */ jsx12("span", { className: "font-medium", children: profile.name }),
|
|
1131
1147
|
profile.model && /* @__PURE__ */ jsx12(Badge, { variant: "secondary", className: "border-0 text-xs", children: profile.model.split("/").pop() })
|
|
1132
1148
|
] }),
|
|
1133
|
-
selectedId === profile.id && /* @__PURE__ */ jsx12(
|
|
1149
|
+
selectedId === profile.id && /* @__PURE__ */ jsx12(Check2, { className: "h-4 w-4 text-[var(--surface-success-text)]" })
|
|
1134
1150
|
] }),
|
|
1135
1151
|
profile.description && /* @__PURE__ */ jsx12("span", { className: "line-clamp-1 text-muted-foreground text-xs", children: profile.description }),
|
|
1136
1152
|
showMetrics && profile.metrics && profile.metrics.total_runs > 0 && /* @__PURE__ */ jsxs11("div", { className: "flex gap-3 text-muted-foreground text-xs", children: [
|
|
@@ -1159,9 +1175,9 @@ function ProfileSelector({
|
|
|
1159
1175
|
DropdownMenuItem,
|
|
1160
1176
|
{
|
|
1161
1177
|
onClick: onCreateClick,
|
|
1162
|
-
className: "text-
|
|
1178
|
+
className: "text-[var(--surface-info-text)]",
|
|
1163
1179
|
children: [
|
|
1164
|
-
/* @__PURE__ */ jsx12(
|
|
1180
|
+
/* @__PURE__ */ jsx12(Plus3, { className: "mr-2 h-4 w-4" }),
|
|
1165
1181
|
"Create New Profile"
|
|
1166
1182
|
]
|
|
1167
1183
|
}
|
|
@@ -1210,8 +1226,8 @@ function ProfileComparison({
|
|
|
1210
1226
|
children: [
|
|
1211
1227
|
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-2", children: [
|
|
1212
1228
|
/* @__PURE__ */ jsx12("span", { className: "font-medium", children: profile.name }),
|
|
1213
|
-
isBestSuccess && /* @__PURE__ */ jsx12(Badge, { className: "border-
|
|
1214
|
-
isFastest && !isBestSuccess && /* @__PURE__ */ jsx12(Badge, { className: "border-
|
|
1229
|
+
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" }),
|
|
1230
|
+
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
1231
|
] }),
|
|
1216
1232
|
/* @__PURE__ */ jsxs11("div", { className: "flex items-center gap-4 text-sm", children: [
|
|
1217
1233
|
/* @__PURE__ */ jsxs11("span", { children: [
|
|
@@ -1220,7 +1236,7 @@ function ProfileComparison({
|
|
|
1220
1236
|
/* @__PURE__ */ jsxs11(
|
|
1221
1237
|
"span",
|
|
1222
1238
|
{
|
|
1223
|
-
className: (profile.metrics?.success_rate ?? 0) >= 80 ? "text-
|
|
1239
|
+
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
1240
|
children: [
|
|
1225
1241
|
profile.metrics?.success_rate.toFixed(0),
|
|
1226
1242
|
"%"
|
|
@@ -1249,10 +1265,10 @@ function ProfileComparison({
|
|
|
1249
1265
|
|
|
1250
1266
|
// src/dashboard/variant-list.tsx
|
|
1251
1267
|
import {
|
|
1252
|
-
Check as
|
|
1268
|
+
Check as Check3,
|
|
1253
1269
|
CheckCircle2,
|
|
1254
1270
|
Clock,
|
|
1255
|
-
ExternalLink,
|
|
1271
|
+
ExternalLink as ExternalLink2,
|
|
1256
1272
|
Loader2,
|
|
1257
1273
|
Timer,
|
|
1258
1274
|
X,
|
|
@@ -1262,64 +1278,74 @@ import { jsx as jsx13, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
|
1262
1278
|
var statusConfig2 = {
|
|
1263
1279
|
pending: {
|
|
1264
1280
|
icon: Clock,
|
|
1265
|
-
color: "text-
|
|
1266
|
-
bg: "bg-
|
|
1281
|
+
color: "text-[var(--surface-warning-text)]",
|
|
1282
|
+
bg: "bg-[var(--surface-warning-bg)]",
|
|
1283
|
+
border: "border-[var(--surface-warning-border)]",
|
|
1267
1284
|
label: "Pending",
|
|
1268
1285
|
animate: false
|
|
1269
1286
|
},
|
|
1270
1287
|
running: {
|
|
1271
1288
|
icon: Loader2,
|
|
1272
|
-
color: "text-
|
|
1273
|
-
bg: "bg-
|
|
1289
|
+
color: "text-[var(--brand-cool)]",
|
|
1290
|
+
bg: "bg-[var(--accent-surface-soft)]",
|
|
1291
|
+
border: "border-[var(--border-accent)]",
|
|
1274
1292
|
label: "Running",
|
|
1275
1293
|
animate: true
|
|
1276
1294
|
},
|
|
1277
1295
|
completed: {
|
|
1278
1296
|
icon: CheckCircle2,
|
|
1279
|
-
color: "text-
|
|
1280
|
-
bg: "bg-
|
|
1297
|
+
color: "text-[var(--surface-success-text)]",
|
|
1298
|
+
bg: "bg-[var(--surface-success-bg)]",
|
|
1299
|
+
border: "border-[var(--surface-success-border)]",
|
|
1281
1300
|
label: "Completed",
|
|
1282
1301
|
animate: false
|
|
1283
1302
|
},
|
|
1284
1303
|
failed: {
|
|
1285
1304
|
icon: XCircle,
|
|
1286
|
-
color: "text-
|
|
1287
|
-
bg: "bg-
|
|
1305
|
+
color: "text-[var(--surface-danger-text)]",
|
|
1306
|
+
bg: "bg-[var(--surface-danger-bg)]",
|
|
1307
|
+
border: "border-[var(--surface-danger-border)]",
|
|
1288
1308
|
label: "Failed",
|
|
1289
1309
|
animate: false
|
|
1290
1310
|
},
|
|
1291
1311
|
cancelled: {
|
|
1292
1312
|
icon: XCircle,
|
|
1293
|
-
color: "text-
|
|
1294
|
-
bg: "bg-
|
|
1313
|
+
color: "text-[var(--surface-neutral-text)]",
|
|
1314
|
+
bg: "bg-[var(--surface-neutral-bg)]",
|
|
1315
|
+
border: "border-[var(--surface-neutral-border)]",
|
|
1295
1316
|
label: "Cancelled",
|
|
1296
1317
|
animate: false
|
|
1297
1318
|
}
|
|
1298
1319
|
};
|
|
1299
1320
|
var outcomeConfig = {
|
|
1300
1321
|
pending_review: {
|
|
1301
|
-
color: "text-
|
|
1302
|
-
bg: "bg-
|
|
1322
|
+
color: "text-[var(--surface-warning-text)]",
|
|
1323
|
+
bg: "bg-[var(--surface-warning-bg)]",
|
|
1324
|
+
border: "border-[var(--surface-warning-border)]",
|
|
1303
1325
|
label: "Pending Review"
|
|
1304
1326
|
},
|
|
1305
1327
|
accepted: {
|
|
1306
|
-
color: "text-
|
|
1307
|
-
bg: "bg-
|
|
1328
|
+
color: "text-[var(--surface-success-text)]",
|
|
1329
|
+
bg: "bg-[var(--surface-success-bg)]",
|
|
1330
|
+
border: "border-[var(--surface-success-border)]",
|
|
1308
1331
|
label: "Accepted"
|
|
1309
1332
|
},
|
|
1310
1333
|
rejected: {
|
|
1311
|
-
color: "text-
|
|
1312
|
-
bg: "bg-
|
|
1334
|
+
color: "text-[var(--surface-danger-text)]",
|
|
1335
|
+
bg: "bg-[var(--surface-danger-bg)]",
|
|
1336
|
+
border: "border-[var(--surface-danger-border)]",
|
|
1313
1337
|
label: "Rejected"
|
|
1314
1338
|
},
|
|
1315
1339
|
merged_with_conflicts: {
|
|
1316
|
-
color: "text-orange-
|
|
1317
|
-
bg: "bg-orange-
|
|
1340
|
+
color: "text-[var(--surface-orange-text)]",
|
|
1341
|
+
bg: "bg-[var(--surface-orange-bg)]",
|
|
1342
|
+
border: "border-[var(--surface-orange-border)]",
|
|
1318
1343
|
label: "Merged (conflicts)"
|
|
1319
1344
|
},
|
|
1320
1345
|
expired: {
|
|
1321
|
-
color: "text-
|
|
1322
|
-
bg: "bg-
|
|
1346
|
+
color: "text-[var(--surface-neutral-text)]",
|
|
1347
|
+
bg: "bg-[var(--surface-neutral-bg)]",
|
|
1348
|
+
border: "border-[var(--surface-neutral-border)]",
|
|
1323
1349
|
label: "Expired"
|
|
1324
1350
|
}
|
|
1325
1351
|
};
|
|
@@ -1339,12 +1365,12 @@ function VariantList({
|
|
|
1339
1365
|
return /* @__PURE__ */ jsxs12(
|
|
1340
1366
|
"div",
|
|
1341
1367
|
{
|
|
1342
|
-
className: `cursor-pointer rounded-lg border p-4 transition-colors ${isSelected ? "border-
|
|
1368
|
+
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
1369
|
onClick: () => onSelect?.(variant.id),
|
|
1344
1370
|
children: [
|
|
1345
1371
|
/* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-between", children: [
|
|
1346
1372
|
/* @__PURE__ */ jsxs12("div", { className: "flex items-center gap-3", children: [
|
|
1347
|
-
/* @__PURE__ */ jsxs12(Badge, { className: `${status.bg} ${status.color}
|
|
1373
|
+
/* @__PURE__ */ jsxs12(Badge, { className: `${status.bg} ${status.border} ${status.color}`, children: [
|
|
1348
1374
|
/* @__PURE__ */ jsx13(
|
|
1349
1375
|
StatusIcon,
|
|
1350
1376
|
{
|
|
@@ -1353,13 +1379,13 @@ function VariantList({
|
|
|
1353
1379
|
),
|
|
1354
1380
|
status.label
|
|
1355
1381
|
] }),
|
|
1356
|
-
/* @__PURE__ */ jsx13("span", { className: "font-medium", children: variant.label }),
|
|
1357
|
-
variant.sublabel && /* @__PURE__ */ jsxs12("span", { className: "text-
|
|
1382
|
+
/* @__PURE__ */ jsx13("span", { className: "font-medium text-[var(--text-primary)]", children: variant.label }),
|
|
1383
|
+
variant.sublabel && /* @__PURE__ */ jsxs12("span", { className: "text-sm text-[var(--text-muted)]", children: [
|
|
1358
1384
|
"(",
|
|
1359
1385
|
variant.sublabel,
|
|
1360
1386
|
")"
|
|
1361
1387
|
] }),
|
|
1362
|
-
variant.durationMs && /* @__PURE__ */ jsxs12("span", { className: "flex items-center gap-1 text-
|
|
1388
|
+
variant.durationMs && /* @__PURE__ */ jsxs12("span", { className: "flex items-center gap-1 text-sm text-[var(--text-muted)]", children: [
|
|
1363
1389
|
/* @__PURE__ */ jsx13(Timer, { className: "h-3 w-3" }),
|
|
1364
1390
|
(variant.durationMs / 1e3).toFixed(2),
|
|
1365
1391
|
"s"
|
|
@@ -1369,7 +1395,7 @@ function VariantList({
|
|
|
1369
1395
|
variant.outcome && /* @__PURE__ */ jsx13(
|
|
1370
1396
|
Badge,
|
|
1371
1397
|
{
|
|
1372
|
-
className: `${outcomeConfig[variant.outcome].bg} ${outcomeConfig[variant.outcome].color}
|
|
1398
|
+
className: `${outcomeConfig[variant.outcome].bg} ${outcomeConfig[variant.outcome].border} ${outcomeConfig[variant.outcome].color}`,
|
|
1373
1399
|
children: outcomeConfig[variant.outcome].label
|
|
1374
1400
|
}
|
|
1375
1401
|
),
|
|
@@ -1379,14 +1405,14 @@ function VariantList({
|
|
|
1379
1405
|
{
|
|
1380
1406
|
variant: "outline",
|
|
1381
1407
|
size: "sm",
|
|
1382
|
-
className: "text-
|
|
1408
|
+
className: "border-[var(--surface-success-border)] bg-[var(--surface-success-bg)] text-[var(--surface-success-text)] hover:bg-[var(--surface-success-border)]",
|
|
1383
1409
|
onClick: (e) => {
|
|
1384
1410
|
e.stopPropagation();
|
|
1385
1411
|
onAccept(variant.id);
|
|
1386
1412
|
},
|
|
1387
1413
|
disabled: isActioning === variant.id,
|
|
1388
1414
|
children: [
|
|
1389
|
-
/* @__PURE__ */ jsx13(
|
|
1415
|
+
/* @__PURE__ */ jsx13(Check3, { className: "mr-1 h-4 w-4" }),
|
|
1390
1416
|
"Accept"
|
|
1391
1417
|
]
|
|
1392
1418
|
}
|
|
@@ -1396,7 +1422,7 @@ function VariantList({
|
|
|
1396
1422
|
{
|
|
1397
1423
|
variant: "outline",
|
|
1398
1424
|
size: "sm",
|
|
1399
|
-
className: "text-
|
|
1425
|
+
className: "border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)] text-[var(--surface-danger-text)] hover:bg-[var(--surface-danger-border)]",
|
|
1400
1426
|
onClick: (e) => {
|
|
1401
1427
|
e.stopPropagation();
|
|
1402
1428
|
onReject(variant.id);
|
|
@@ -1414,18 +1440,18 @@ function VariantList({
|
|
|
1414
1440
|
{
|
|
1415
1441
|
variant: "ghost",
|
|
1416
1442
|
size: "sm",
|
|
1417
|
-
className: "text-muted-
|
|
1443
|
+
className: "text-[var(--text-muted)] hover:text-[var(--text-primary)]",
|
|
1418
1444
|
onClick: (e) => {
|
|
1419
1445
|
e.stopPropagation();
|
|
1420
1446
|
window.open(variant.detailsUrl, "_blank");
|
|
1421
1447
|
},
|
|
1422
|
-
children: /* @__PURE__ */ jsx13(
|
|
1448
|
+
children: /* @__PURE__ */ jsx13(ExternalLink2, { className: "h-4 w-4" })
|
|
1423
1449
|
}
|
|
1424
1450
|
)
|
|
1425
1451
|
] })
|
|
1426
1452
|
] }),
|
|
1427
|
-
variant.error && /* @__PURE__ */ jsx13("p", { className: "mt-2 text-
|
|
1428
|
-
variant.summary && /* @__PURE__ */ jsx13("p", { className: "mt-2 line-clamp-2 text-
|
|
1453
|
+
variant.error && /* @__PURE__ */ jsx13("p", { className: "mt-2 text-sm text-[var(--surface-danger-text)]", children: variant.error }),
|
|
1454
|
+
variant.summary && /* @__PURE__ */ jsx13("p", { className: "mt-2 line-clamp-2 text-sm text-[var(--text-muted)]", children: variant.summary })
|
|
1429
1455
|
]
|
|
1430
1456
|
},
|
|
1431
1457
|
variant.id
|