@tangle-network/sandbox-ui 0.10.4 → 0.10.5

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.
@@ -391,7 +391,10 @@ function CreditBalance({
391
391
  {
392
392
  type: "text",
393
393
  value: `$${topUpValue}`,
394
- onChange: (e) => setTopUpValue(e.target.value.replace(/[^0-9.]/g, "")),
394
+ onChange: (e) => {
395
+ const raw = e.target.value.replace(/[^0-9.]/g, "");
396
+ setTopUpValue(raw.match(/^(\d*\.?\d{0,2})/)?.[1] ?? "");
397
+ },
395
398
  className: "bg-transparent border-none text-foreground font-mono text-lg w-full focus:ring-0 px-4 outline-none"
396
399
  }
397
400
  ),
@@ -399,19 +402,24 @@ function CreditBalance({
399
402
  "button",
400
403
  {
401
404
  type: "button",
402
- onClick: () => onTopUp(Number.parseFloat(topUpValue)),
405
+ onClick: () => {
406
+ const parsed = Number.parseFloat(topUpValue);
407
+ if (!Number.isFinite(parsed) || parsed <= 0) return;
408
+ onTopUp(parsed);
409
+ },
403
410
  className: "bg-[var(--accent-surface-soft)] border border-border 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)]",
404
411
  children: "Top Up"
405
412
  }
406
413
  )
407
414
  ] }),
408
- /* @__PURE__ */ jsx4("div", { className: "flex justify-between gap-2", children: quickAmounts.map((qa) => /* @__PURE__ */ jsxs3(
415
+ /* @__PURE__ */ jsx4("div", { className: "flex justify-between gap-2", children: quickAmounts.filter((qa) => Number.isFinite(qa) && qa > 0).map((qa) => /* @__PURE__ */ jsxs3(
409
416
  "button",
410
417
  {
411
418
  type: "button",
412
419
  onClick: () => {
413
- setTopUpValue(String(qa));
414
- onTopUp(qa);
420
+ const rounded = parseFloat(qa.toFixed(2));
421
+ setTopUpValue(qa.toFixed(2));
422
+ onTopUp(rounded);
415
423
  },
416
424
  className: "flex-1 py-2 text-[10px] font-mono text-muted-foreground border border-border rounded-md hover:bg-muted/50 hover:text-foreground transition-colors uppercase",
417
425
  children: [
@@ -854,9 +862,14 @@ import {
854
862
  Code2,
855
863
  Network,
856
864
  Play,
857
- Plus as Plus2
865
+ Plus as Plus2,
866
+ Users
858
867
  } from "lucide-react";
859
868
  import { Fragment as Fragment5, jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
869
+ function canAdminSandbox(sandbox) {
870
+ if (!sandbox.team) return true;
871
+ return sandbox.team.role === "owner" || sandbox.team.role === "admin";
872
+ }
860
873
  function SandboxCard({
861
874
  sandbox,
862
875
  onOpenIDE,
@@ -883,14 +896,33 @@ function SandboxCard({
883
896
  ), children: [
884
897
  /* @__PURE__ */ jsxs8("div", { className: "flex items-start justify-between", children: [
885
898
  /* @__PURE__ */ jsxs8("div", { children: [
886
- /* @__PURE__ */ jsxs8("h3", { className: "flex items-center gap-2 text-sm font-bold text-foreground", children: [
887
- sandbox.name,
888
- isRunning && /* @__PURE__ */ jsxs8("span", { className: "relative flex h-2 w-2", children: [
889
- /* @__PURE__ */ jsx9("span", { className: "absolute inline-flex h-full w-full animate-pulse rounded-full bg-[var(--status-running)] opacity-75" }),
890
- /* @__PURE__ */ jsx9("span", { className: "relative inline-flex h-1.5 w-1.5 rounded-full bg-[var(--status-running)]" })
891
- ] })
899
+ /* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-2", children: [
900
+ /* @__PURE__ */ jsxs8("h3", { className: "flex items-center gap-2 text-sm font-bold text-foreground", children: [
901
+ sandbox.name,
902
+ isRunning && /* @__PURE__ */ jsxs8("span", { className: "relative flex h-2 w-2", children: [
903
+ /* @__PURE__ */ jsx9("span", { className: "absolute inline-flex h-full w-full animate-pulse rounded-full bg-[var(--status-running)] opacity-75" }),
904
+ /* @__PURE__ */ jsx9("span", { className: "relative inline-flex h-1.5 w-1.5 rounded-full bg-[var(--status-running)]" })
905
+ ] })
906
+ ] }),
907
+ sandbox.team && /* @__PURE__ */ jsxs8(
908
+ "span",
909
+ {
910
+ className: "inline-flex items-center gap-1 rounded-full bg-[var(--accent-surface-soft)] px-2 py-0.5 text-[10px] font-semibold text-[var(--accent-text)]",
911
+ title: `Shared with ${sandbox.team.name ?? "Team"} \xB7 ${sandbox.team.role}`,
912
+ children: [
913
+ /* @__PURE__ */ jsx9(Users, { className: "h-3 w-3", "aria-hidden": "true" }),
914
+ sandbox.team.name ?? "Team"
915
+ ]
916
+ }
917
+ )
892
918
  ] }),
893
- /* @__PURE__ */ jsx9("p", { className: "mt-0.5 font-mono text-[10px] tracking-wider text-muted-foreground uppercase", children: sandbox.nodeId || "Unknown Node" })
919
+ /* @__PURE__ */ jsxs8("p", { className: "mt-0.5 font-mono text-[10px] tracking-wider text-muted-foreground uppercase", children: [
920
+ sandbox.nodeId || "Unknown Node",
921
+ sandbox.team && /* @__PURE__ */ jsxs8("span", { className: "ml-2 normal-case tracking-normal", children: [
922
+ "\xB7 your role: ",
923
+ sandbox.team.role
924
+ ] })
925
+ ] })
894
926
  ] }),
895
927
  /* @__PURE__ */ jsxs8(DropdownMenu, { children: [
896
928
  /* @__PURE__ */ jsx9(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx9(
@@ -941,7 +973,7 @@ function SandboxCard({
941
973
  ] }),
942
974
  (onResume || onFork) && /* @__PURE__ */ jsx9(DropdownMenuSeparator, {})
943
975
  ] }),
944
- onDelete && /* @__PURE__ */ jsxs8(DropdownMenuItem, { className: "text-destructive focus:bg-destructive/10 focus:text-destructive", onClick: () => onDelete(sandbox.id), children: [
976
+ onDelete && canAdminSandbox(sandbox) && /* @__PURE__ */ jsxs8(DropdownMenuItem, { className: "text-destructive focus:bg-destructive/10 focus:text-destructive", onClick: () => onDelete(sandbox.id), children: [
945
977
  /* @__PURE__ */ jsx9(Trash2, { className: "mr-2 h-4 w-4" }),
946
978
  " Delete Sandbox"
947
979
  ] })
@@ -1022,7 +1054,7 @@ function NewSandboxCard({ onClick, className }) {
1022
1054
  }
1023
1055
 
1024
1056
  // src/dashboard/sandbox-table.tsx
1025
- import { Terminal as Terminal2, Code2 as Code22, Key, Trash2 as Trash22, RefreshCw, ChevronLeft, ChevronRight } from "lucide-react";
1057
+ import { Terminal as Terminal2, Code2 as Code22, Key, Trash2 as Trash22, RefreshCw, ChevronLeft, ChevronRight, Users as Users2, User } from "lucide-react";
1026
1058
  import { Fragment as Fragment6, jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
1027
1059
  var statusColors = {
1028
1060
  running: { dot: "bg-[var(--code-success)] animate-pulse", text: "text-[var(--code-success)]", bar: "bg-[var(--code-success)]" },
@@ -1061,11 +1093,13 @@ function SandboxTable({
1061
1093
  }) {
1062
1094
  const totalCount = total ?? sandboxes.length;
1063
1095
  const totalPages = Math.ceil(totalCount / pageSize);
1096
+ const hasTeamSandboxes = sandboxes.some((sb) => sb.team !== void 0);
1064
1097
  return /* @__PURE__ */ jsxs9("div", { className: cn("w-full", className), children: [
1065
1098
  /* @__PURE__ */ jsx10("div", { className: "w-full bg-card rounded-2xl overflow-hidden border border-border", children: /* @__PURE__ */ jsx10("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs9("table", { className: "w-full text-left border-collapse", children: [
1066
1099
  /* @__PURE__ */ jsx10("thead", { children: /* @__PURE__ */ jsxs9("tr", { className: "bg-background border-b border-border", children: [
1067
1100
  /* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: "Status" }),
1068
1101
  /* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: "Sandbox Name" }),
1102
+ hasTeamSandboxes && /* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: "Scope" }),
1069
1103
  /* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: "Environment" }),
1070
1104
  /* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-muted-foreground uppercase tracking-wider", children: "Resources" }),
1071
1105
  /* @__PURE__ */ jsx10("th", { className: "px-6 py-4 text-xs font-semibold text-muted-foreground uppercase tracking-wider text-right", children: "Actions" })
@@ -1084,6 +1118,31 @@ function SandboxTable({
1084
1118
  /* @__PURE__ */ jsx10("span", { className: "text-sm font-bold text-foreground group-hover:text-primary transition-colors", children: sb.name }),
1085
1119
  sb.nodeId && /* @__PURE__ */ jsx10("span", { className: "text-[10px] font-mono text-muted-foreground", children: sb.nodeId })
1086
1120
  ] }) }),
1121
+ hasTeamSandboxes && /* @__PURE__ */ jsx10("td", { className: "px-6 py-5", children: sb.team ? /* @__PURE__ */ jsxs9(
1122
+ "div",
1123
+ {
1124
+ className: "inline-flex items-center gap-1.5 rounded-full bg-[var(--accent-surface-soft)] px-2.5 py-1 text-[11px] font-semibold text-[var(--accent-text)]",
1125
+ title: `Shared with ${sb.team.name ?? "Team"} \xB7 ${sb.team.role}`,
1126
+ children: [
1127
+ /* @__PURE__ */ jsx10(Users2, { className: "h-3 w-3", "aria-hidden": "true" }),
1128
+ /* @__PURE__ */ jsx10("span", { children: sb.team.name ?? "Team" }),
1129
+ /* @__PURE__ */ jsxs9("span", { className: "font-normal text-muted-foreground", children: [
1130
+ "\xB7 ",
1131
+ sb.team.role
1132
+ ] })
1133
+ ]
1134
+ }
1135
+ ) : /* @__PURE__ */ jsxs9(
1136
+ "div",
1137
+ {
1138
+ className: "inline-flex items-center gap-1.5 rounded-full bg-muted px-2.5 py-1 text-[11px] font-medium text-muted-foreground",
1139
+ title: "Personal sandbox",
1140
+ children: [
1141
+ /* @__PURE__ */ jsx10(User, { className: "h-3 w-3", "aria-hidden": "true" }),
1142
+ "Personal"
1143
+ ]
1144
+ }
1145
+ ) }),
1087
1146
  /* @__PURE__ */ jsx10("td", { className: "px-6 py-5", children: /* @__PURE__ */ jsxs9("div", { className: "flex items-center gap-3", children: [
1088
1147
  sb.imageIcon && /* @__PURE__ */ jsx10("div", { className: "w-8 h-8 rounded-lg bg-muted/50 flex items-center justify-center", children: sb.imageIcon }),
1089
1148
  sb.image && /* @__PURE__ */ jsx10("span", { className: "text-xs font-bold text-foreground", children: sb.image })
@@ -1106,7 +1165,7 @@ function SandboxTable({
1106
1165
  ] }),
1107
1166
  isHibernating && /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onWake?.(sb.id), className: "px-3 py-1.5 rounded-lg border border-border text-primary text-[10px] font-bold uppercase tracking-wider hover:bg-[var(--accent-surface-soft)] active:scale-95 transition-all", children: "Wake Up" }),
1108
1167
  onMore && /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onMore(sb.id), className: "p-2 rounded-lg hover:bg-muted text-muted-foreground hover:text-foreground transition-all active:scale-90", children: /* @__PURE__ */ jsx10(Code22, { className: "h-4 w-4" }) }),
1109
- onDelete && /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onDelete(sb.id), className: "p-2 rounded-lg hover:bg-[var(--surface-danger-bg)] text-muted-foreground hover:text-[var(--surface-danger-text)] transition-all active:scale-90", title: "Delete", children: /* @__PURE__ */ jsx10(Trash22, { className: "h-4 w-4" }) })
1168
+ onDelete && canAdminSandbox(sb) && /* @__PURE__ */ jsx10("button", { type: "button", onClick: () => onDelete(sb.id), className: "p-2 rounded-lg hover:bg-[var(--surface-danger-bg)] text-muted-foreground hover:text-[var(--surface-danger-text)] transition-all active:scale-90", title: "Delete", children: /* @__PURE__ */ jsx10(Trash22, { className: "h-4 w-4" }) })
1110
1169
  ] }) })
1111
1170
  ] }, sb.id);
1112
1171
  }) })
@@ -1627,6 +1686,7 @@ export {
1627
1686
  PlanCards,
1628
1687
  DashboardLayout,
1629
1688
  ResourceMeter,
1689
+ canAdminSandbox,
1630
1690
  SandboxCard,
1631
1691
  NewSandboxCard,
1632
1692
  SandboxTable,
@@ -1,5 +1,5 @@
1
- export { B as Backend, a as BackendSelector, b as BackendSelectorProps, C as ClusterStatusBar, c as ClusterStatusBarProps, d as ClusterStatusItem, e as CreditBalance, f as CreditBalanceProps, D as DashboardLayout, g as DashboardLayoutProps, ah as DashboardProfile, h as DashboardUser, I as Invoice, i as InvoiceTable, j as InvoiceTableProps, N as NavItem, k as NewSandboxCard, l as NewSandboxCardProps, m as PlanCardData, n as PlanCards, o as PlanCardsProps, ai as PlanFeature, p as ProductVariant, q as ProfileAvatar, r as ProfileAvatarProps, s as ProfileComparison, t as ProfileComparisonProps, u as ProfileSelector, v as ProfileSelectorProps, R as RailButton, w as RailButtonProps, x as RailModeButton, y as RailModeButtonProps, z as RailSeparator, A as RailSeparatorProps, E as ResourceMeter, F as ResourceMeterProps, S as SIDEBAR_MOBILE_WIDTH, G as SIDEBAR_PANEL_WIDTH, H as SIDEBAR_RAIL_WIDTH, J as SIDEBAR_TOTAL_WIDTH, K as SandboxCard, L as SandboxCardData, M as SandboxCardProps, O as SandboxStatus, Q as SandboxTable, T as SandboxTableProps, U as Sidebar, V as SidebarContent, W as SidebarContentProps, X as SidebarPanel, Y as SidebarPanelContent, Z as SidebarPanelContentProps, _ as SidebarPanelHeader, $ as SidebarPanelHeaderProps, a0 as SidebarPanelProps, a1 as SidebarProps, a2 as SidebarProvider, a3 as SidebarProviderProps, a4 as SidebarRail, a5 as SidebarRailFooter, a6 as SidebarRailFooterProps, a7 as SidebarRailHeader, a8 as SidebarRailHeaderProps, a9 as SidebarRailNav, aa as SidebarRailNavProps, ab as SidebarRailProps, ac as SidebarUser, aj as Variant, ae as VariantList, af as VariantListProps, ak as VariantOutcome, al as VariantStatus, ag as useSidebar } from './variant-list-DHP2OXFE.js';
2
- export { a as BillingBalance, c as BillingDashboard, d as BillingDashboardProps, B as BillingSubscription, b as BillingUsage, e as PricingPage, f as PricingPageProps, P as PricingTier, g as UsageChart, h as UsageChartProps, U as UsageDataPoint } from './usage-chart-SSiOgeQI.js';
1
+ export { B as Backend, a as BackendSelector, b as BackendSelectorProps, C as ClusterStatusBar, c as ClusterStatusBarProps, d as ClusterStatusItem, e as CreditBalance, f as CreditBalanceProps, D as DashboardLayout, g as DashboardLayoutProps, ah as DashboardProfile, h as DashboardUser, I as Invoice, i as InvoiceTable, j as InvoiceTableProps, N as NavItem, k as NewSandboxCard, l as NewSandboxCardProps, m as PlanCardData, n as PlanCards, o as PlanCardsProps, ai as PlanFeature, p as ProductVariant, q as ProfileAvatar, r as ProfileAvatarProps, s as ProfileComparison, t as ProfileComparisonProps, u as ProfileSelector, v as ProfileSelectorProps, R as RailButton, w as RailButtonProps, x as RailModeButton, y as RailModeButtonProps, z as RailSeparator, A as RailSeparatorProps, E as ResourceMeter, F as ResourceMeterProps, S as SIDEBAR_MOBILE_WIDTH, G as SIDEBAR_PANEL_WIDTH, H as SIDEBAR_RAIL_WIDTH, J as SIDEBAR_TOTAL_WIDTH, K as SandboxCard, L as SandboxCardData, M as SandboxCardProps, O as SandboxStatus, Q as SandboxTable, T as SandboxTableProps, U as Sidebar, V as SidebarContent, W as SidebarContentProps, X as SidebarPanel, Y as SidebarPanelContent, Z as SidebarPanelContentProps, _ as SidebarPanelHeader, $ as SidebarPanelHeaderProps, a0 as SidebarPanelProps, a1 as SidebarProps, a2 as SidebarProvider, a3 as SidebarProviderProps, a4 as SidebarRail, a5 as SidebarRailFooter, a6 as SidebarRailFooterProps, a7 as SidebarRailHeader, a8 as SidebarRailHeaderProps, a9 as SidebarRailNav, aa as SidebarRailNavProps, ab as SidebarRailProps, ac as SidebarUser, aj as TeamRole, ak as Variant, ae as VariantList, af as VariantListProps, al as VariantOutcome, am as VariantStatus, an as canAdminSandbox, ag as useSidebar } from './variant-list-DAhiR-7S.js';
2
+ export { a as BillingBalance, c as BillingDashboard, d as BillingDashboardProps, B as BillingSubscription, b as BillingUsage, e as PricingPage, f as PricingPageProps, P as PricingTier, g as UsageChart, h as UsageChartProps, U as UsageDataPoint, i as formatPrice } from './usage-chart-CPTcNlGs.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  export { a as TemplateCard, T as TemplateCardData, b as TemplateCardProps } from './template-card-BAtvcAkU.js';
5
5
  import * as React from 'react';
package/dist/dashboard.js CHANGED
@@ -34,13 +34,15 @@ import {
34
34
  SidebarRailHeader,
35
35
  SidebarRailNav,
36
36
  VariantList,
37
+ canAdminSandbox,
37
38
  useSidebar
38
- } from "./chunk-XQF6LQDV.js";
39
+ } from "./chunk-Z5PSS3VD.js";
39
40
  import {
40
41
  BillingDashboard,
41
42
  PricingPage,
42
- UsageChart
43
- } from "./chunk-OHPW55EV.js";
43
+ UsageChart,
44
+ formatPrice
45
+ } from "./chunk-QMU2PWOU.js";
44
46
  import {
45
47
  StatCard
46
48
  } from "./chunk-OKLQVY3Y.js";
@@ -967,5 +969,7 @@ export {
967
969
  UsageChart,
968
970
  UsageSummary,
969
971
  VariantList,
972
+ canAdminSandbox,
973
+ formatPrice,
970
974
  useSidebar
971
975
  };
package/dist/globals.css CHANGED
@@ -906,6 +906,9 @@
906
906
  .mr-3 {
907
907
  margin-right: calc(var(--spacing) * 3);
908
908
  }
909
+ .-mb-px {
910
+ margin-bottom: -1px;
911
+ }
909
912
  .mb-0\.5 {
910
913
  margin-bottom: calc(var(--spacing) * 0.5);
911
914
  }
@@ -1607,6 +1610,9 @@
1607
1610
  .flex-row-reverse {
1608
1611
  flex-direction: row-reverse;
1609
1612
  }
1613
+ .flex-nowrap {
1614
+ flex-wrap: nowrap;
1615
+ }
1610
1616
  .flex-wrap {
1611
1617
  flex-wrap: wrap;
1612
1618
  }
@@ -1972,6 +1978,9 @@
1972
1978
  --tw-border-style: none;
1973
1979
  border-style: none;
1974
1980
  }
1981
+ .border-\[var\(--accent-text\)\] {
1982
+ border-color: var(--accent-text);
1983
+ }
1975
1984
  .border-\[var\(--border-accent\)\] {
1976
1985
  border-color: var(--border-accent);
1977
1986
  }
@@ -2140,9 +2149,18 @@
2140
2149
  background-color: color-mix(in srgb,var(--bg-card) 94%,transparent);
2141
2150
  }
2142
2151
  }
2152
+ .bg-\[var\(--accent-surface\)\] {
2153
+ background-color: var(--accent-surface);
2154
+ }
2143
2155
  .bg-\[var\(--accent-surface-soft\)\] {
2144
2156
  background-color: var(--accent-surface-soft);
2145
2157
  }
2158
+ .bg-\[var\(--accent-surface-soft\)\]\/40 {
2159
+ background-color: var(--accent-surface-soft);
2160
+ @supports (color: color-mix(in lab, red, red)) {
2161
+ background-color: color-mix(in oklab, var(--accent-surface-soft) 40%, transparent);
2162
+ }
2163
+ }
2146
2164
  .bg-\[var\(--accent-surface-strong\)\] {
2147
2165
  background-color: var(--accent-surface-strong);
2148
2166
  }
@@ -2898,6 +2916,12 @@
2898
2916
  .text-\[var\(--accent-text\)\] {
2899
2917
  color: var(--accent-text);
2900
2918
  }
2919
+ .text-\[var\(--accent-text\)\]\/80 {
2920
+ color: var(--accent-text);
2921
+ @supports (color: color-mix(in lab, red, red)) {
2922
+ color: color-mix(in oklab, var(--accent-text) 80%, transparent);
2923
+ }
2924
+ }
2901
2925
  .text-\[var\(--brand-cool\)\] {
2902
2926
  color: var(--brand-cool);
2903
2927
  }
@@ -3057,6 +3081,9 @@
3057
3081
  .capitalize {
3058
3082
  text-transform: capitalize;
3059
3083
  }
3084
+ .normal-case {
3085
+ text-transform: none;
3086
+ }
3060
3087
  .uppercase {
3061
3088
  text-transform: uppercase;
3062
3089
  }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { B as Button, a as ButtonProps, b as buttonVariants } from './button-CMQuQEW_.js';
2
- export { Avatar, AvatarFallback, AvatarImage, Badge, BadgeProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropZone, DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EmptyStateProps, Input, InputProps, Label, Logo, LogoProps, Progress, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SidebarDropZone, SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, StatCard, StatCardProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TangleKnot, TerminalDisplay, TerminalCursor as TerminalDisplayCursor, TerminalInput as TerminalDisplayInput, TerminalLine as TerminalDisplayLine, Textarea, TextareaProps, Toast, ToastContainer, ToastProvider, UploadFile, UploadProgress, UploadProgressProps, badgeVariants, useToast } from './primitives.js';
2
+ export { A as Avatar, a as AvatarFallback, b as AvatarImage, B as Badge, c as BadgeProps, C as Card, d as CardContent, e as CardDescription, f as CardFooter, g as CardHeader, h as CardTitle, D as Dialog, i as DialogClose, j as DialogContent, k as DialogDescription, l as DialogFooter, m as DialogHeader, n as DialogOverlay, o as DialogPortal, p as DialogTitle, q as DialogTrigger, r as DropZone, s as DropZoneProps, t as DropdownMenu, u as DropdownMenuCheckboxItem, v as DropdownMenuContent, w as DropdownMenuGroup, x as DropdownMenuItem, y as DropdownMenuLabel, z as DropdownMenuPortal, E as DropdownMenuRadioGroup, F as DropdownMenuRadioItem, G as DropdownMenuSeparator, H as DropdownMenuShortcut, I as DropdownMenuSub, J as DropdownMenuSubContent, K as DropdownMenuSubTrigger, L as DropdownMenuTrigger, M as EmptyState, N as EmptyStateProps, O as Input, P as InputProps, Q as Label, R as Logo, S as LogoProps, T as Progress, U as Select, V as SelectContent, W as SelectGroup, X as SelectItem, Y as SelectLabel, Z as SelectScrollDownButton, _ as SelectScrollUpButton, $ as SelectSeparator, a0 as SelectTrigger, a1 as SelectValue, a2 as SidebarDropZone, a3 as SidebarDropZoneProps, a4 as Skeleton, a5 as SkeletonCard, a6 as SkeletonTable, a7 as StatCard, a8 as StatCardProps, a9 as Switch, aa as Table, ab as TableBody, ac as TableCaption, ad as TableCell, ae as TableFooter, af as TableHead, ag as TableHeader, ah as TableRow, ai as Tabs, aj as TabsContent, ak as TabsList, al as TabsTrigger, am as TangleKnot, ao as TerminalDisplay, an as TerminalDisplayCursor, ap as TerminalDisplayInput, aq as TerminalDisplayLine, ar as Textarea, as as TextareaProps, at as Toast, au as ToastContainer, av as ToastProvider, aw as UploadFile, ax as UploadProgress, ay as UploadProgressProps, az as badgeVariants, aA as useToast } from './sidebar-drop-zone-tDBsuOH5.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  export { AgentWorkbench, ApprovalConfidenceStat, ApprovalItem, ApprovalQueue, ApprovalQueueProps, AuditCheck, AuditResults, AuditResultsProps, BannerType, CalendarEvent, CalendarView, CalendarViewProps, ContextBadge, DirectoryPane, DirectoryPaneProps, FormAudit, RuntimePane, RuntimePaneProps, SandboxWorkbench, SandboxWorkbenchArtifact, SandboxWorkbenchCustomArtifact, SandboxWorkbenchFileArtifact, SandboxWorkbenchLayoutOptions, SandboxWorkbenchMarkdownArtifact, SandboxWorkbenchOpenUIArtifact, SandboxWorkbenchProps, SandboxWorkbenchSessionProps, SessionActivityMonitor, SessionActivityMonitorProps, SessionSidebar, SessionSidebarBadge, SessionSidebarFilter, SessionSidebarItem, SessionSidebarLink, SessionSidebarProps, StatusBanner, StatusBannerProps, StatusBar, StatusBarProps, TaskBoard, TaskBoardColumn, TaskBoardItem, TaskBoardProps, TerminalLine, TerminalPanel, TerminalProps, WorkspaceLayout, WorkspaceLayoutProps } from './workspace.js';
5
5
  export { a as ArtifactPane, A as ArtifactPaneProps } from './artifact-pane-Bh45Ssco.js';
@@ -15,8 +15,8 @@ import { b as ToolPart } from './parts-CyGkM6Fp.js';
15
15
  export { R as ReasoningPart, S as SessionMessage, a as SessionPart, T as TextPart, c as ToolState, d as ToolStatus, e as ToolTime } from './parts-CyGkM6Fp.js';
16
16
  export { F as FileNode, a as FileTabData, b as FileTabs, c as FileTabsProps, d as FileTree, e as FileTreeProps, f as FileTreeVisibilityOptions, g as filterFileTree } from './file-tabs-BLfxfmAH.js';
17
17
  export { FileArtifactPane, FileArtifactPaneProps, FilePreview, FilePreviewProps } from './files.js';
18
- export { B as Backend, a as BackendSelector, b as BackendSelectorProps, C as ClusterStatusBar, c as ClusterStatusBarProps, d as ClusterStatusItem, e as CreditBalance, f as CreditBalanceProps, D as DashboardLayout, g as DashboardLayoutProps, h as DashboardUser, I as Invoice, i as InvoiceTable, j as InvoiceTableProps, N as NavItem, k as NewSandboxCard, l as NewSandboxCardProps, P as PanelConfig, m as PlanCardData, n as PlanCards, o as PlanCardsProps, p as ProductVariant, q as ProfileAvatar, r as ProfileAvatarProps, s as ProfileComparison, t as ProfileComparisonProps, u as ProfileSelector, v as ProfileSelectorProps, R as RailButton, w as RailButtonProps, x as RailModeButton, y as RailModeButtonProps, z as RailSeparator, A as RailSeparatorProps, E as ResourceMeter, F as ResourceMeterProps, S as SIDEBAR_MOBILE_WIDTH, G as SIDEBAR_PANEL_WIDTH, H as SIDEBAR_RAIL_WIDTH, J as SIDEBAR_TOTAL_WIDTH, K as SandboxCard, L as SandboxCardData, M as SandboxCardProps, O as SandboxStatus, Q as SandboxTable, T as SandboxTableProps, U as Sidebar, V as SidebarContent, W as SidebarContentProps, X as SidebarPanel, Y as SidebarPanelContent, Z as SidebarPanelContentProps, _ as SidebarPanelHeader, $ as SidebarPanelHeaderProps, a0 as SidebarPanelProps, a1 as SidebarProps, a2 as SidebarProvider, a3 as SidebarProviderProps, a4 as SidebarRail, a5 as SidebarRailFooter, a6 as SidebarRailFooterProps, a7 as SidebarRailHeader, a8 as SidebarRailHeaderProps, a9 as SidebarRailNav, aa as SidebarRailNavProps, ab as SidebarRailProps, ac as SidebarUser, ad as TopNavLink, ae as VariantList, af as VariantListProps, ag as useSidebar } from './variant-list-DHP2OXFE.js';
19
- export { c as BillingDashboard, d as BillingDashboardProps, e as PricingCards, f as PricingPageProps, g as UsageChart, h as UsageChartProps, U as UsageDataPoint } from './usage-chart-SSiOgeQI.js';
18
+ export { B as Backend, a as BackendSelector, b as BackendSelectorProps, C as ClusterStatusBar, c as ClusterStatusBarProps, d as ClusterStatusItem, e as CreditBalance, f as CreditBalanceProps, D as DashboardLayout, g as DashboardLayoutProps, h as DashboardUser, I as Invoice, i as InvoiceTable, j as InvoiceTableProps, N as NavItem, k as NewSandboxCard, l as NewSandboxCardProps, P as PanelConfig, m as PlanCardData, n as PlanCards, o as PlanCardsProps, p as ProductVariant, q as ProfileAvatar, r as ProfileAvatarProps, s as ProfileComparison, t as ProfileComparisonProps, u as ProfileSelector, v as ProfileSelectorProps, R as RailButton, w as RailButtonProps, x as RailModeButton, y as RailModeButtonProps, z as RailSeparator, A as RailSeparatorProps, E as ResourceMeter, F as ResourceMeterProps, S as SIDEBAR_MOBILE_WIDTH, G as SIDEBAR_PANEL_WIDTH, H as SIDEBAR_RAIL_WIDTH, J as SIDEBAR_TOTAL_WIDTH, K as SandboxCard, L as SandboxCardData, M as SandboxCardProps, O as SandboxStatus, Q as SandboxTable, T as SandboxTableProps, U as Sidebar, V as SidebarContent, W as SidebarContentProps, X as SidebarPanel, Y as SidebarPanelContent, Z as SidebarPanelContentProps, _ as SidebarPanelHeader, $ as SidebarPanelHeaderProps, a0 as SidebarPanelProps, a1 as SidebarProps, a2 as SidebarProvider, a3 as SidebarProviderProps, a4 as SidebarRail, a5 as SidebarRailFooter, a6 as SidebarRailFooterProps, a7 as SidebarRailHeader, a8 as SidebarRailHeaderProps, a9 as SidebarRailNav, aa as SidebarRailNavProps, ab as SidebarRailProps, ac as SidebarUser, ad as TopNavLink, ae as VariantList, af as VariantListProps, ag as useSidebar } from './variant-list-DAhiR-7S.js';
19
+ export { c as BillingDashboard, d as BillingDashboardProps, e as PricingCards, f as PricingPageProps, g as UsageChart, h as UsageChartProps, U as UsageDataPoint } from './usage-chart-CPTcNlGs.js';
20
20
  export { AuthHeader, GitHubLoginButton, LoginLayout, LoginLayoutProps, UserMenu } from './auth.js';
21
21
  export { CodeBlock, CodeBlock as CodeBlockDisplay, CopyButton, Markdown, MarkdownProps } from './markdown.js';
22
22
  export { AppendUserMessageOptions, ApplySdkEventOptions, BeginAssistantMessageOptions, CompleteAssistantMessageOptions, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, useAutoScroll, useDropdownMenu, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionStream, useSidecarAuth, useToolCallStream } from './sdk-hooks.js';
package/dist/index.js CHANGED
@@ -63,7 +63,7 @@ import {
63
63
  ToastProvider,
64
64
  UploadProgress,
65
65
  useToast
66
- } from "./chunk-D4CZWJCD.js";
66
+ } from "./chunk-36QY2W5G.js";
67
67
  import {
68
68
  Dialog,
69
69
  DialogClose,
@@ -213,12 +213,12 @@ import {
213
213
  SidebarRailNav,
214
214
  VariantList,
215
215
  useSidebar
216
- } from "./chunk-XQF6LQDV.js";
216
+ } from "./chunk-Z5PSS3VD.js";
217
217
  import {
218
218
  BillingDashboard,
219
219
  PricingPage,
220
220
  UsageChart
221
- } from "./chunk-OHPW55EV.js";
221
+ } from "./chunk-QMU2PWOU.js";
222
222
  import {
223
223
  Logo,
224
224
  StatCard,
package/dist/pages.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { B as BillingSubscription, a as BillingBalance, b as BillingUsage, U as UsageDataPoint, P as PricingTier } from './usage-chart-SSiOgeQI.js';
2
+ import { B as BillingSubscription, a as BillingBalance, b as BillingUsage, U as UsageDataPoint, P as PricingTier } from './usage-chart-CPTcNlGs.js';
3
3
  import * as React from 'react';
4
4
  import { T as TemplateCardData } from './template-card-BAtvcAkU.js';
5
5
 
@@ -201,8 +201,22 @@ interface SecretsApiClient {
201
201
  interface SecretsPageProps {
202
202
  apiClient: SecretsApiClient;
203
203
  className?: string;
204
+ /**
205
+ * Optional hint pointing users at team-level secrets. When provided,
206
+ * renders a persistent informational banner below the header clarifying
207
+ * that personal secrets are NOT shared with teams and linking the
208
+ * user to their team-management page to configure shared secrets
209
+ * there. Omit entirely to hide the banner (e.g. in deployments
210
+ * without teams).
211
+ */
212
+ teamSecretsHint?: {
213
+ /** Callback fired when the user clicks the banner's CTA. */
214
+ onNavigate: () => void;
215
+ /** CTA label. Defaults to "Manage team secrets". */
216
+ label?: string;
217
+ };
204
218
  }
205
- declare function SecretsPage({ apiClient, className }: SecretsPageProps): react_jsx_runtime.JSX.Element;
219
+ declare function SecretsPage({ apiClient, className, teamSecretsHint }: SecretsPageProps): react_jsx_runtime.JSX.Element;
206
220
 
207
221
  interface TemplatesPageProps {
208
222
  templates: TemplateCardData[] | null;
package/dist/pages.js CHANGED
@@ -24,7 +24,7 @@ import {
24
24
  BillingDashboard,
25
25
  PricingPage,
26
26
  UsageChart
27
- } from "./chunk-OHPW55EV.js";
27
+ } from "./chunk-QMU2PWOU.js";
28
28
  import {
29
29
  Skeleton,
30
30
  SkeletonCard
@@ -2105,9 +2105,9 @@ function ProfileDetailDialog({
2105
2105
 
2106
2106
  // src/pages/secrets-page.tsx
2107
2107
  import * as React5 from "react";
2108
- import { Lock, Plus as Plus3, Trash2 as Trash23, Eye, EyeOff, AlertCircle as AlertCircle2, Key, Shield, CheckCircle } from "lucide-react";
2108
+ import { Lock, Plus as Plus3, Trash2 as Trash23, Eye, EyeOff, AlertCircle as AlertCircle2, Key, Shield, CheckCircle, Users, ArrowRight } from "lucide-react";
2109
2109
  import { jsx as jsx5, jsxs as jsxs5 } from "react/jsx-runtime";
2110
- function SecretsPage({ apiClient, className }) {
2110
+ function SecretsPage({ apiClient, className, teamSecretsHint }) {
2111
2111
  const [secrets, setSecrets] = React5.useState([]);
2112
2112
  const [loading, setLoading] = React5.useState(true);
2113
2113
  const [error, setError] = React5.useState(null);
@@ -2198,6 +2198,29 @@ function SecretsPage({ apiClient, className }) {
2198
2198
  }
2199
2199
  )
2200
2200
  ] }),
2201
+ teamSecretsHint && /* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-3 rounded-lg border border-border bg-[var(--accent-surface-soft)]/40 px-4 py-3", children: [
2202
+ /* @__PURE__ */ jsx5(Users, { className: "h-5 w-5 shrink-0 text-[var(--accent-text)]", "aria-hidden": "true" }),
2203
+ /* @__PURE__ */ jsxs5("div", { className: "flex-1 text-sm", children: [
2204
+ /* @__PURE__ */ jsx5("p", { className: "font-semibold text-foreground", children: "Setting up secrets for a team?" }),
2205
+ /* @__PURE__ */ jsxs5("p", { className: "mt-0.5 text-muted-foreground text-xs", children: [
2206
+ "Secrets here are ",
2207
+ /* @__PURE__ */ jsx5("strong", { children: "personal" }),
2208
+ " \u2014 only available in sandboxes you create. To share credentials with teammates, configure them on the team page instead."
2209
+ ] })
2210
+ ] }),
2211
+ /* @__PURE__ */ jsxs5(
2212
+ "button",
2213
+ {
2214
+ type: "button",
2215
+ onClick: teamSecretsHint.onNavigate,
2216
+ className: "inline-flex shrink-0 items-center gap-1 rounded-md border border-border bg-card px-3 py-1.5 text-xs font-semibold text-foreground hover:bg-muted transition-colors",
2217
+ children: [
2218
+ teamSecretsHint.label ?? "Manage team secrets",
2219
+ /* @__PURE__ */ jsx5(ArrowRight, { className: "h-3 w-3", "aria-hidden": "true" })
2220
+ ]
2221
+ }
2222
+ )
2223
+ ] }),
2201
2224
  /* @__PURE__ */ jsxs5("div", { className: "grid grid-cols-1 gap-6 md:grid-cols-4", children: [
2202
2225
  /* @__PURE__ */ jsxs5("div", { className: "rounded-lg border border-border bg-card p-5 shadow-[var(--shadow-card)]", children: [
2203
2226
  /* @__PURE__ */ jsx5("p", { className: "text-[10px] font-bold uppercase tracking-widest text-muted-foreground", children: "Total Active Secrets" }),