@tangle-network/sandbox-ui 0.3.3 → 0.3.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.
@@ -166,8 +166,76 @@ function AuthHeader({
166
166
  );
167
167
  }
168
168
 
169
+ // src/auth/login-layout.tsx
170
+ import { Fragment, jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
171
+ function MaterialIcon({ name, className }) {
172
+ return /* @__PURE__ */ jsx2("span", { className: cn("material-symbols-outlined", className), style: { fontVariationSettings: "'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24" }, children: name });
173
+ }
174
+ function LoginLayout({
175
+ brandName = "Tangle Sandbox",
176
+ tagline,
177
+ subtitle = "Step into the next generation of sandboxed cloud infrastructure. Precise, ethereal, and designed for high-performance development.",
178
+ terminalLines = [
179
+ "Initializing secure environment...",
180
+ "DONE Encrypted bridge established.",
181
+ "Awaiting user authentication..."
182
+ ],
183
+ footerLinks = [
184
+ { label: "Documentation", href: "/docs" },
185
+ { label: "Support", href: "/support" }
186
+ ],
187
+ children,
188
+ className
189
+ }) {
190
+ return /* @__PURE__ */ jsxs2("div", { className: cn("bg-surface text-on-surface font-sans overflow-hidden", className), children: [
191
+ /* @__PURE__ */ jsxs2("div", { className: "fixed inset-0 z-0 overflow-hidden", children: [
192
+ /* @__PURE__ */ jsx2("div", { className: "absolute top-[-10%] left-[-10%] w-[50%] h-[50%] bg-md3-primary/10 rounded-full blur-[120px]" }),
193
+ /* @__PURE__ */ jsx2("div", { className: "absolute bottom-[-10%] right-[-10%] w-[40%] h-[40%] bg-secondary-container/10 rounded-full blur-[100px]" }),
194
+ /* @__PURE__ */ jsx2("div", { className: "absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-full h-full opacity-20 pointer-events-none", style: { backgroundImage: "radial-gradient(#4a4455 1px, transparent 1px)", backgroundSize: "40px 40px" } })
195
+ ] }),
196
+ /* @__PURE__ */ jsxs2("main", { className: "relative z-10 flex flex-col md:flex-row h-screen", children: [
197
+ /* @__PURE__ */ jsxs2("section", { className: "hidden md:flex flex-col justify-between p-12 lg:p-20 w-1/2 h-full", children: [
198
+ /* @__PURE__ */ jsx2("div", { className: "space-y-4", children: /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-3", children: [
199
+ /* @__PURE__ */ jsx2("div", { className: "w-10 h-10 bg-gradient-to-br from-md3-primary to-primary-container rounded-lg flex items-center justify-center shadow-lg shadow-md3-primary/20", children: /* @__PURE__ */ jsx2(MaterialIcon, { name: "terminal", className: "text-on-primary text-2xl" }) }),
200
+ /* @__PURE__ */ jsx2("span", { className: "text-2xl font-extrabold tracking-tighter bg-gradient-to-br from-violet-300 to-violet-600 bg-clip-text text-transparent", children: brandName })
201
+ ] }) }),
202
+ /* @__PURE__ */ jsxs2("div", { className: "max-w-lg space-y-6", children: [
203
+ tagline ? /* @__PURE__ */ jsx2("div", { className: "text-5xl lg:text-7xl font-bold tracking-tight leading-none text-white", children: tagline }) : /* @__PURE__ */ jsxs2("h1", { className: "text-5xl lg:text-7xl font-bold tracking-tight leading-none text-white", children: [
204
+ "Orchestrate ",
205
+ /* @__PURE__ */ jsx2("br", {}),
206
+ /* @__PURE__ */ jsx2("span", { className: "text-primary-fixed-dim", children: "Agents" }),
207
+ " in Flow."
208
+ ] }),
209
+ /* @__PURE__ */ jsx2("p", { className: "text-on-surface-variant text-lg leading-relaxed font-light", children: subtitle }),
210
+ /* @__PURE__ */ jsxs2("div", { className: "mt-12 bg-surface-container-lowest rounded-xl border border-outline-variant/10 overflow-hidden shadow-2xl", children: [
211
+ /* @__PURE__ */ jsxs2("div", { className: "bg-surface-container-high px-4 py-2 flex items-center gap-2", children: [
212
+ /* @__PURE__ */ jsx2("div", { className: "w-3 h-3 rounded-full bg-md3-error/40" }),
213
+ /* @__PURE__ */ jsx2("div", { className: "w-3 h-3 rounded-full bg-md3-primary/40" }),
214
+ /* @__PURE__ */ jsx2("div", { className: "w-3 h-3 rounded-full bg-md3-secondary/40" }),
215
+ /* @__PURE__ */ jsx2("span", { className: "ml-4 font-mono text-xs text-on-surface-variant/60", children: "tangle --init-node" })
216
+ ] }),
217
+ /* @__PURE__ */ jsx2("div", { className: "p-6 font-mono text-xs space-y-2", children: terminalLines.map((line, i) => /* @__PURE__ */ jsxs2("div", { className: "flex gap-4", children: [
218
+ /* @__PURE__ */ jsx2("span", { className: "text-md3-primary/60", children: String(i + 1).padStart(2, "0") }),
219
+ line.startsWith("DONE") ? /* @__PURE__ */ jsxs2(Fragment, { children: [
220
+ /* @__PURE__ */ jsx2("span", { className: "text-primary-fixed-dim", children: "DONE" }),
221
+ /* @__PURE__ */ jsx2("span", { className: "text-on-surface", children: line.replace("DONE ", "") })
222
+ ] }) : /* @__PURE__ */ jsx2("span", { className: "text-on-surface", children: line })
223
+ ] }, i)) })
224
+ ] })
225
+ ] }),
226
+ /* @__PURE__ */ jsx2("nav", { className: "flex gap-8 text-sm font-medium text-on-surface-variant", children: footerLinks.map((link) => /* @__PURE__ */ jsxs2("a", { href: link.href, className: "hover:text-md3-primary transition-colors flex items-center gap-2", children: [
227
+ /* @__PURE__ */ jsx2(MaterialIcon, { name: link.label === "Documentation" ? "menu_book" : "contact_support", className: "text-lg" }),
228
+ link.label
229
+ ] }, link.href)) })
230
+ ] }),
231
+ /* @__PURE__ */ jsx2("section", { className: "w-full md:w-1/2 flex items-center justify-center p-6 lg:p-24 relative", children: /* @__PURE__ */ jsx2("div", { className: "w-full max-w-md bg-surface-container/60 backdrop-blur-[20px] rounded-[2rem] p-8 lg:p-12 shadow-2xl border border-white/5", children }) })
232
+ ] })
233
+ ] });
234
+ }
235
+
169
236
  export {
170
237
  GitHubLoginButton,
171
238
  UserMenu,
172
- AuthHeader
239
+ AuthHeader,
240
+ LoginLayout
173
241
  };
@@ -248,7 +248,7 @@ function WorkspaceLayout({
248
248
  "data-sandbox-theme": theme,
249
249
  "data-density": density,
250
250
  className: cn(
251
- "flex h-screen flex-col overflow-hidden bg-[radial-gradient(circle_at_top,rgba(98,114,243,0.14),transparent_34%),linear-gradient(180deg,var(--bg-root),var(--bg-dark)_82%)] text-[var(--text-primary)] font-[var(--font-sans)]",
251
+ "flex h-screen flex-col overflow-hidden bg-[var(--bg-root)] text-[var(--text-primary)] font-[var(--font-sans)]",
252
252
  className
253
253
  ),
254
254
  children: [
@@ -1,114 +1,4 @@
1
- import * as react_jsx_runtime from 'react/jsx-runtime';
1
+ export { A as AppSidebar, a as AppSidebarProps, B as Backend, b as BackendSelector, c as BackendSelectorProps, C as ClusterStatusBar, d as ClusterStatusBarProps, e as ClusterStatusItem, D as DashboardLayout, f as DashboardLayoutProps, v as DashboardProfile, g as DashboardUser, N as NavItem, h as NewSandboxCard, i as NewSandboxCardProps, w as ProductVariant, P as ProfileComparison, j as ProfileComparisonProps, k as ProfileSelector, l as ProfileSelectorProps, R as ResourceMeter, m as ResourceMeterProps, S as SandboxCard, n as SandboxCardData, o as SandboxCardProps, p as SandboxStatus, q as SandboxTable, r as SandboxTableProps, s as SidebarNavItem, t as SidebarSandbox, x as Variant, V as VariantList, u as VariantListProps, y as VariantOutcome, z as VariantStatus } from './index-BOjBJwzD.js';
2
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-CY9xo3KX.js';
3
- import * as React from 'react';
4
-
5
- type ProductVariant = "sandbox";
6
- interface NavItem {
7
- id: string;
8
- label: string;
9
- href: string;
10
- icon: React.ComponentType<{
11
- className?: string;
12
- }>;
13
- }
14
- interface DashboardUser {
15
- email: string;
16
- name?: string;
17
- tier?: string;
18
- avatarUrl?: string;
19
- }
20
- interface DashboardLayoutProps {
21
- children: React.ReactNode;
22
- variant?: ProductVariant;
23
- navItems: NavItem[];
24
- activeNavId?: string;
25
- user?: DashboardUser | null;
26
- isLoading?: boolean;
27
- onLogout?: () => void;
28
- onSettingsClick?: () => void;
29
- settingsHref?: string;
30
- className?: string;
31
- sidebarClassName?: string;
32
- contentClassName?: string;
33
- /** Custom link component (e.g., Next.js Link). Use any type to support various router implementations. */
34
- LinkComponent?: React.ComponentType<any>;
35
- }
36
- declare function DashboardLayout({ children, variant, navItems, activeNavId, user, isLoading, onLogout, onSettingsClick, settingsHref, className, sidebarClassName, contentClassName, LinkComponent, }: DashboardLayoutProps): react_jsx_runtime.JSX.Element;
37
-
38
- interface Backend {
39
- type: string;
40
- label: string;
41
- description?: string;
42
- }
43
- interface BackendSelectorProps {
44
- backends: Backend[];
45
- selected: string[];
46
- onChange: (selected: string[]) => void;
47
- label?: string;
48
- hint?: string;
49
- multiSelect?: boolean;
50
- className?: string;
51
- }
52
- declare function BackendSelector({ backends, selected, onChange, label, hint, multiSelect, className, }: BackendSelectorProps): react_jsx_runtime.JSX.Element;
53
-
54
- interface Profile {
55
- id: string;
56
- name: string;
57
- description?: string;
58
- is_builtin?: boolean;
59
- extends?: string;
60
- model?: string;
61
- metrics?: {
62
- total_runs: number;
63
- success_rate: number;
64
- avg_duration_ms: number;
65
- };
66
- }
67
- interface ProfileSelectorProps {
68
- profiles: Profile[];
69
- selectedId?: string | null;
70
- onSelect: (profile: Profile | null) => void;
71
- onCreateClick?: () => void;
72
- onManageClick?: () => void;
73
- label?: string;
74
- placeholder?: string;
75
- showMetrics?: boolean;
76
- className?: string;
77
- }
78
- declare function ProfileSelector({ profiles, selectedId, onSelect, onCreateClick, onManageClick, label, placeholder, showMetrics, className, }: ProfileSelectorProps): react_jsx_runtime.JSX.Element;
79
- /**
80
- * Profile performance comparison card.
81
- * Shows metrics from multiple profiles side by side.
82
- */
83
- interface ProfileComparisonProps {
84
- profiles: Profile[];
85
- className?: string;
86
- }
87
- declare function ProfileComparison({ profiles, className, }: ProfileComparisonProps): react_jsx_runtime.JSX.Element | null;
88
-
89
- type VariantStatus = "pending" | "running" | "completed" | "failed" | "cancelled";
90
- type VariantOutcome = "pending_review" | "accepted" | "rejected" | "merged_with_conflicts" | "expired";
91
- interface Variant {
92
- id: string;
93
- label: string;
94
- sublabel?: string;
95
- status: VariantStatus;
96
- outcome?: VariantOutcome;
97
- durationMs?: number;
98
- error?: string;
99
- summary?: string;
100
- /** Link to view variant details (e.g., chat UI) */
101
- detailsUrl?: string;
102
- }
103
- interface VariantListProps {
104
- variants: Variant[];
105
- selectedId?: string | null;
106
- onSelect?: (id: string) => void;
107
- onAccept?: (id: string) => void;
108
- onReject?: (id: string) => void;
109
- isActioning?: string | null;
110
- className?: string;
111
- }
112
- declare function VariantList({ variants, selectedId, onSelect, onAccept, onReject, isActioning, className, }: VariantListProps): react_jsx_runtime.JSX.Element;
113
-
114
- export { type Backend, BackendSelector, type BackendSelectorProps, DashboardLayout, type DashboardLayoutProps, type Profile as DashboardProfile, type DashboardUser, type NavItem, type ProductVariant, ProfileComparison, type ProfileComparisonProps, ProfileSelector, type ProfileSelectorProps, type Variant, VariantList, type VariantListProps, type VariantOutcome, type VariantStatus };
3
+ import 'react/jsx-runtime';
4
+ import 'react';
package/dist/dashboard.js CHANGED
@@ -1,10 +1,16 @@
1
1
  import {
2
+ AppSidebar,
2
3
  BackendSelector,
4
+ ClusterStatusBar,
3
5
  DashboardLayout,
6
+ NewSandboxCard,
4
7
  ProfileComparison,
5
8
  ProfileSelector,
9
+ ResourceMeter,
10
+ SandboxCard,
11
+ SandboxTable,
6
12
  VariantList
7
- } from "./chunk-OM6ON27W.js";
13
+ } from "./chunk-HY5IBRCE.js";
8
14
  import {
9
15
  BillingDashboard,
10
16
  PricingPage,
@@ -17,12 +23,18 @@ import "./chunk-MXCSSOGH.js";
17
23
  import "./chunk-HWLX5NME.js";
18
24
  import "./chunk-RQHJBTEU.js";
19
25
  export {
26
+ AppSidebar,
20
27
  BackendSelector,
21
28
  BillingDashboard,
29
+ ClusterStatusBar,
22
30
  DashboardLayout,
31
+ NewSandboxCard,
23
32
  PricingPage,
24
33
  ProfileComparison,
25
34
  ProfileSelector,
35
+ ResourceMeter,
36
+ SandboxCard,
37
+ SandboxTable,
26
38
  UsageChart,
27
39
  VariantList
28
40
  };
@@ -0,0 +1,219 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import * as React from 'react';
3
+ import './usage-chart-CY9xo3KX.js';
4
+
5
+ interface SidebarNavItem {
6
+ id: string;
7
+ label: string;
8
+ href: string;
9
+ icon: string;
10
+ badge?: string;
11
+ }
12
+ interface SidebarSandbox {
13
+ id: string;
14
+ name: string;
15
+ label?: string;
16
+ }
17
+ interface AppSidebarProps {
18
+ navItems: SidebarNavItem[];
19
+ activeNavId?: string;
20
+ sandboxes?: SidebarSandbox[];
21
+ activeSandboxId?: string;
22
+ onSandboxChange?: (id: string) => void;
23
+ onNewAgent?: () => void;
24
+ className?: string;
25
+ LinkComponent?: React.ComponentType<any>;
26
+ }
27
+ declare function AppSidebar({ navItems, activeNavId, sandboxes, activeSandboxId, onSandboxChange, onNewAgent, className, LinkComponent, }: AppSidebarProps): react_jsx_runtime.JSX.Element;
28
+
29
+ interface ClusterStatusItem {
30
+ icon: string;
31
+ label: string;
32
+ value: string;
33
+ valueClass?: string;
34
+ }
35
+ interface ClusterStatusBarProps {
36
+ items: ClusterStatusItem[];
37
+ latency?: string;
38
+ className?: string;
39
+ }
40
+ declare function ClusterStatusBar({ items, latency, className }: ClusterStatusBarProps): react_jsx_runtime.JSX.Element;
41
+
42
+ type ProductVariant = "sandbox";
43
+ interface NavItem {
44
+ id: string;
45
+ label: string;
46
+ href: string;
47
+ icon: React.ComponentType<{
48
+ className?: string;
49
+ }>;
50
+ /** Material icon name for Stitch sidebar (optional, falls back to icon component) */
51
+ materialIcon?: string;
52
+ }
53
+ interface DashboardUser {
54
+ email: string;
55
+ name?: string;
56
+ tier?: string;
57
+ avatarUrl?: string;
58
+ }
59
+ interface TopNavLink {
60
+ label: string;
61
+ href: string;
62
+ }
63
+ interface DashboardLayoutProps {
64
+ children: React.ReactNode;
65
+ variant?: ProductVariant;
66
+ navItems: NavItem[];
67
+ activeNavId?: string;
68
+ user?: DashboardUser | null;
69
+ isLoading?: boolean;
70
+ onLogout?: () => void;
71
+ onSettingsClick?: () => void;
72
+ settingsHref?: string;
73
+ onNewSandbox?: () => void;
74
+ className?: string;
75
+ sidebarClassName?: string;
76
+ contentClassName?: string;
77
+ topNavLinks?: TopNavLink[];
78
+ activeTopNavHref?: string;
79
+ sandboxName?: string;
80
+ sandboxLabel?: string;
81
+ /** Custom link component (e.g., Next.js Link). Use any type to support various router implementations. */
82
+ LinkComponent?: React.ComponentType<any>;
83
+ /** Footer content rendered at bottom of viewport */
84
+ footer?: React.ReactNode;
85
+ }
86
+ declare function DashboardLayout({ children, variant, navItems, activeNavId, user, isLoading, onLogout, onSettingsClick, settingsHref, onNewSandbox, className, sidebarClassName, contentClassName, topNavLinks, activeTopNavHref, sandboxName, sandboxLabel, LinkComponent, footer, }: DashboardLayoutProps): react_jsx_runtime.JSX.Element;
87
+
88
+ interface ResourceMeterProps {
89
+ label: string;
90
+ value: number;
91
+ max?: number;
92
+ unit?: string;
93
+ icon?: string;
94
+ className?: string;
95
+ }
96
+ declare function ResourceMeter({ label, value, max, unit, icon, className }: ResourceMeterProps): react_jsx_runtime.JSX.Element;
97
+
98
+ type SandboxStatus = "running" | "hibernating" | "provisioning" | "stopped" | "failed" | "archived";
99
+ interface SandboxCardData {
100
+ id: string;
101
+ name: string;
102
+ nodeId?: string;
103
+ status: SandboxStatus;
104
+ image?: string;
105
+ imageIcon?: React.ReactNode;
106
+ cpuPercent?: number;
107
+ ramUsed?: number;
108
+ ramTotal?: number;
109
+ provisioningMessage?: string;
110
+ provisioningPercent?: number;
111
+ archivedAt?: string;
112
+ }
113
+ interface SandboxCardProps {
114
+ sandbox: SandboxCardData;
115
+ onOpenIDE?: (id: string) => void;
116
+ onOpenTerminal?: (id: string) => void;
117
+ onWake?: (id: string) => void;
118
+ onRestore?: (id: string) => void;
119
+ className?: string;
120
+ }
121
+ declare function SandboxCard({ sandbox, onOpenIDE, onOpenTerminal, onWake, onRestore, className }: SandboxCardProps): react_jsx_runtime.JSX.Element;
122
+ interface NewSandboxCardProps {
123
+ onClick?: () => void;
124
+ className?: string;
125
+ }
126
+ declare function NewSandboxCard({ onClick, className }: NewSandboxCardProps): react_jsx_runtime.JSX.Element;
127
+
128
+ interface SandboxTableProps {
129
+ sandboxes: SandboxCardData[];
130
+ page?: number;
131
+ pageSize?: number;
132
+ total?: number;
133
+ onPageChange?: (page: number) => void;
134
+ onOpenIDE?: (id: string) => void;
135
+ onOpenTerminal?: (id: string) => void;
136
+ onSSH?: (id: string) => void;
137
+ onWake?: (id: string) => void;
138
+ onMore?: (id: string) => void;
139
+ className?: string;
140
+ }
141
+ declare function SandboxTable({ sandboxes, page, pageSize, total, onPageChange, onOpenIDE, onOpenTerminal, onSSH, onWake, onMore, className, }: SandboxTableProps): react_jsx_runtime.JSX.Element;
142
+
143
+ interface Backend {
144
+ type: string;
145
+ label: string;
146
+ description?: string;
147
+ }
148
+ interface BackendSelectorProps {
149
+ backends: Backend[];
150
+ selected: string[];
151
+ onChange: (selected: string[]) => void;
152
+ label?: string;
153
+ hint?: string;
154
+ multiSelect?: boolean;
155
+ className?: string;
156
+ }
157
+ declare function BackendSelector({ backends, selected, onChange, label, hint, multiSelect, className, }: BackendSelectorProps): react_jsx_runtime.JSX.Element;
158
+
159
+ interface Profile {
160
+ id: string;
161
+ name: string;
162
+ description?: string;
163
+ is_builtin?: boolean;
164
+ extends?: string;
165
+ model?: string;
166
+ metrics?: {
167
+ total_runs: number;
168
+ success_rate: number;
169
+ avg_duration_ms: number;
170
+ };
171
+ }
172
+ interface ProfileSelectorProps {
173
+ profiles: Profile[];
174
+ selectedId?: string | null;
175
+ onSelect: (profile: Profile | null) => void;
176
+ onCreateClick?: () => void;
177
+ onManageClick?: () => void;
178
+ label?: string;
179
+ placeholder?: string;
180
+ showMetrics?: boolean;
181
+ className?: string;
182
+ }
183
+ declare function ProfileSelector({ profiles, selectedId, onSelect, onCreateClick, onManageClick, label, placeholder, showMetrics, className, }: ProfileSelectorProps): react_jsx_runtime.JSX.Element;
184
+ /**
185
+ * Profile performance comparison card.
186
+ * Shows metrics from multiple profiles side by side.
187
+ */
188
+ interface ProfileComparisonProps {
189
+ profiles: Profile[];
190
+ className?: string;
191
+ }
192
+ declare function ProfileComparison({ profiles, className, }: ProfileComparisonProps): react_jsx_runtime.JSX.Element | null;
193
+
194
+ type VariantStatus = "pending" | "running" | "completed" | "failed" | "cancelled";
195
+ type VariantOutcome = "pending_review" | "accepted" | "rejected" | "merged_with_conflicts" | "expired";
196
+ interface Variant {
197
+ id: string;
198
+ label: string;
199
+ sublabel?: string;
200
+ status: VariantStatus;
201
+ outcome?: VariantOutcome;
202
+ durationMs?: number;
203
+ error?: string;
204
+ summary?: string;
205
+ /** Link to view variant details (e.g., chat UI) */
206
+ detailsUrl?: string;
207
+ }
208
+ interface VariantListProps {
209
+ variants: Variant[];
210
+ selectedId?: string | null;
211
+ onSelect?: (id: string) => void;
212
+ onAccept?: (id: string) => void;
213
+ onReject?: (id: string) => void;
214
+ isActioning?: string | null;
215
+ className?: string;
216
+ }
217
+ declare function VariantList({ variants, selectedId, onSelect, onAccept, onReject, isActioning, className, }: VariantListProps): react_jsx_runtime.JSX.Element;
218
+
219
+ export { AppSidebar as A, type Backend as B, ClusterStatusBar as C, DashboardLayout as D, type NavItem as N, ProfileComparison as P, ResourceMeter as R, SandboxCard as S, type TopNavLink as T, VariantList as V, type AppSidebarProps as a, BackendSelector as b, type BackendSelectorProps as c, type ClusterStatusBarProps as d, type ClusterStatusItem as e, type DashboardLayoutProps as f, type DashboardUser as g, NewSandboxCard as h, type NewSandboxCardProps as i, type ProfileComparisonProps as j, ProfileSelector as k, type ProfileSelectorProps as l, type ResourceMeterProps as m, type SandboxCardData as n, type SandboxCardProps as o, type SandboxStatus as p, SandboxTable as q, type SandboxTableProps as r, type SidebarNavItem as s, type SidebarSandbox as t, type VariantListProps as u, type Profile as v, type ProductVariant as w, type Variant as x, type VariantOutcome as y, type VariantStatus as z };
package/dist/index.d.ts CHANGED
@@ -13,9 +13,9 @@ export { E as ExpandedToolDetail, I as InlineThinkingItem, c as InlineToolItem,
13
13
  import { b as ToolPart } from './parts-CyGkM6Fp.js';
14
14
  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';
15
15
  export { FileArtifactPane, FileArtifactPaneProps, FilePreview, FilePreviewProps } from './files.js';
16
- export { Backend, BackendSelector, BackendSelectorProps, DashboardLayout, DashboardLayoutProps, DashboardUser, NavItem, ProfileComparison, ProfileComparisonProps, ProfileSelector, ProfileSelectorProps, VariantList, VariantListProps } from './dashboard.js';
16
+ export { A as AppSidebar, a as AppSidebarProps, B as Backend, b as BackendSelector, c as BackendSelectorProps, C as ClusterStatusBar, d as ClusterStatusBarProps, e as ClusterStatusItem, D as DashboardLayout, f as DashboardLayoutProps, g as DashboardUser, N as NavItem, h as NewSandboxCard, i as NewSandboxCardProps, P as ProfileComparison, j as ProfileComparisonProps, k as ProfileSelector, l as ProfileSelectorProps, R as ResourceMeter, m as ResourceMeterProps, S as SandboxCard, n as SandboxCardData, o as SandboxCardProps, p as SandboxStatus, q as SandboxTable, r as SandboxTableProps, s as SidebarNavItem, t as SidebarSandbox, T as TopNavLink, V as VariantList, u as VariantListProps } from './index-BOjBJwzD.js';
17
17
  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-CY9xo3KX.js';
18
- export { AuthHeader, GitHubLoginButton, UserMenu } from './auth.js';
18
+ export { AuthHeader, GitHubLoginButton, LoginLayout, LoginLayoutProps, UserMenu } from './auth.js';
19
19
  export { CodeBlock, CopyButton, Markdown, MarkdownProps } from './markdown.js';
20
20
  export { AppendUserMessageOptions, ApplySdkEventOptions, BeginAssistantMessageOptions, CompleteAssistantMessageOptions, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, useAutoScroll, useDropdownMenu, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionStream, useSidecarAuth, useToolCallStream } from './sdk-hooks.js';
21
21
  export { d as createAuthFetcher, u as useApiKey, e as useAuth, f as usePtySession } from './use-pty-session-DeZSxOCN.js';
package/dist/index.js CHANGED
@@ -5,8 +5,9 @@ import {
5
5
  import {
6
6
  AuthHeader,
7
7
  GitHubLoginButton,
8
+ LoginLayout,
8
9
  UserMenu
9
- } from "./chunk-COCSO7FG.js";
10
+ } from "./chunk-PCTEG6HR.js";
10
11
  import {
11
12
  createAuthFetcher,
12
13
  useApiKey,
@@ -80,7 +81,7 @@ import {
80
81
  StatusBar,
81
82
  TerminalPanel,
82
83
  WorkspaceLayout
83
- } from "./chunk-67C53XVV.js";
84
+ } from "./chunk-QGI5E7JD.js";
84
85
  import {
85
86
  EmptyState,
86
87
  Input,
@@ -156,14 +157,18 @@ import {
156
157
  Markdown
157
158
  } from "./chunk-LTFK464G.js";
158
159
  import {
160
+ AppSidebar,
159
161
  BackendSelector,
162
+ ClusterStatusBar,
160
163
  DashboardLayout,
164
+ NewSandboxCard,
161
165
  ProfileComparison,
162
166
  ProfileSelector,
163
- ThemeToggle,
164
- VariantList,
165
- useTheme
166
- } from "./chunk-OM6ON27W.js";
167
+ ResourceMeter,
168
+ SandboxCard,
169
+ SandboxTable,
170
+ VariantList
171
+ } from "./chunk-HY5IBRCE.js";
167
172
  import {
168
173
  BillingDashboard,
169
174
  PricingPage,
@@ -213,9 +218,95 @@ import {
213
218
  import {
214
219
  cn
215
220
  } from "./chunk-RQHJBTEU.js";
221
+
222
+ // src/primitives/theme-toggle.tsx
223
+ import { useCallback, useEffect, useState } from "react";
224
+ import { jsx, jsxs } from "react/jsx-runtime";
225
+ function getSystemTheme() {
226
+ return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
227
+ }
228
+ function applyTheme(theme) {
229
+ const resolved = theme === "system" ? getSystemTheme() : theme;
230
+ document.documentElement.classList.toggle("dark", resolved === "dark");
231
+ }
232
+ function useTheme() {
233
+ const [theme, setThemeState] = useState(() => {
234
+ if (typeof window === "undefined") return "system";
235
+ return localStorage.getItem("theme") ?? "system";
236
+ });
237
+ const setTheme = useCallback((next) => {
238
+ setThemeState(next);
239
+ if (next === "system") {
240
+ localStorage.removeItem("theme");
241
+ } else {
242
+ localStorage.setItem("theme", next);
243
+ }
244
+ applyTheme(next);
245
+ }, []);
246
+ useEffect(() => {
247
+ applyTheme(theme);
248
+ if (theme !== "system") return;
249
+ const mq = window.matchMedia("(prefers-color-scheme: dark)");
250
+ const handler = () => applyTheme("system");
251
+ mq.addEventListener("change", handler);
252
+ return () => mq.removeEventListener("change", handler);
253
+ }, [theme]);
254
+ return { theme, setTheme };
255
+ }
256
+ var iconClass = "h-4 w-4";
257
+ function SunIcon() {
258
+ return /* @__PURE__ */ jsxs(
259
+ "svg",
260
+ {
261
+ xmlns: "http://www.w3.org/2000/svg",
262
+ viewBox: "0 0 24 24",
263
+ fill: "none",
264
+ stroke: "currentColor",
265
+ strokeWidth: 2,
266
+ strokeLinecap: "round",
267
+ strokeLinejoin: "round",
268
+ className: iconClass,
269
+ children: [
270
+ /* @__PURE__ */ jsx("circle", { cx: 12, cy: 12, r: 5 }),
271
+ /* @__PURE__ */ jsx("path", { d: "M12 1v2M12 21v2M4.22 4.22l1.42 1.42M18.36 18.36l1.42 1.42M1 12h2M21 12h2M4.22 19.78l1.42-1.42M18.36 5.64l1.42-1.42" })
272
+ ]
273
+ }
274
+ );
275
+ }
276
+ function MoonIcon() {
277
+ return /* @__PURE__ */ jsx(
278
+ "svg",
279
+ {
280
+ xmlns: "http://www.w3.org/2000/svg",
281
+ viewBox: "0 0 24 24",
282
+ fill: "none",
283
+ stroke: "currentColor",
284
+ strokeWidth: 2,
285
+ strokeLinecap: "round",
286
+ strokeLinejoin: "round",
287
+ className: iconClass,
288
+ children: /* @__PURE__ */ jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" })
289
+ }
290
+ );
291
+ }
292
+ function ThemeToggle() {
293
+ const { theme, setTheme } = useTheme();
294
+ const resolved = theme === "system" ? getSystemTheme() : theme;
295
+ return /* @__PURE__ */ jsx(
296
+ "button",
297
+ {
298
+ type: "button",
299
+ onClick: () => setTheme(resolved === "dark" ? "light" : "dark"),
300
+ className: "inline-flex items-center justify-center rounded-md p-2 text-muted-foreground hover:bg-accent hover:text-accent-foreground transition-colors",
301
+ "aria-label": `Switch to ${resolved === "dark" ? "light" : "dark"} mode`,
302
+ children: resolved === "dark" ? /* @__PURE__ */ jsx(SunIcon, {}) : /* @__PURE__ */ jsx(MoonIcon, {})
303
+ }
304
+ );
305
+ }
216
306
  export {
217
307
  AgentTimeline,
218
308
  AgentWorkbench,
309
+ AppSidebar,
219
310
  ArtifactPane,
220
311
  AuditResults,
221
312
  AuthHeader,
@@ -235,6 +326,7 @@ export {
235
326
  ChatContainer,
236
327
  ChatInput,
237
328
  ChatMessage,
329
+ ClusterStatusBar,
238
330
  CodeBlock2 as CodeBlock,
239
331
  CodeBlock as CodeBlockDisplay,
240
332
  CommandPreview,
@@ -281,17 +373,22 @@ export {
281
373
  InlineToolItem,
282
374
  Input,
283
375
  Label,
376
+ LoginLayout,
284
377
  Logo,
285
378
  Markdown,
286
379
  MessageList,
380
+ NewSandboxCard,
287
381
  OpenUIArtifactRenderer,
288
382
  PricingPage as PricingCards,
289
383
  ProfileComparison,
290
384
  ProfileSelector,
291
385
  Progress,
292
386
  QuestionPreview,
387
+ ResourceMeter,
293
388
  RunGroup,
294
389
  RuntimePane,
390
+ SandboxCard,
391
+ SandboxTable,
295
392
  SandboxWorkbench,
296
393
  Select,
297
394
  SelectContent,