@tangle-network/sandbox-ui 0.3.4 → 0.3.6

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
  };
@@ -1,4 +1,4 @@
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';
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, f as CreditBalance, g as CreditBalanceProps, D as DashboardLayout, h as DashboardLayoutProps, G as DashboardProfile, i as DashboardUser, I as Invoice, j as InvoiceTable, k as InvoiceTableProps, N as NavItem, l as NewSandboxCard, m as NewSandboxCardProps, P as PlanCardData, n as PlanCards, o as PlanCardsProps, H as PlanFeature, J as ProductVariant, p as ProfileComparison, q as ProfileComparisonProps, r as ProfileSelector, s as ProfileSelectorProps, R as ResourceMeter, t as ResourceMeterProps, S as SandboxCard, u as SandboxCardData, v as SandboxCardProps, w as SandboxStatus, x as SandboxTable, y as SandboxTableProps, z as SidebarNavItem, E as SidebarSandbox, K as Variant, V as VariantList, F as VariantListProps, L as VariantOutcome, M as VariantStatus } from './index-BJIPTCKk.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
3
  import 'react/jsx-runtime';
4
4
  import 'react';
package/dist/dashboard.js CHANGED
@@ -2,15 +2,18 @@ import {
2
2
  AppSidebar,
3
3
  BackendSelector,
4
4
  ClusterStatusBar,
5
+ CreditBalance,
5
6
  DashboardLayout,
7
+ InvoiceTable,
6
8
  NewSandboxCard,
9
+ PlanCards,
7
10
  ProfileComparison,
8
11
  ProfileSelector,
9
12
  ResourceMeter,
10
13
  SandboxCard,
11
14
  SandboxTable,
12
15
  VariantList
13
- } from "./chunk-HY5IBRCE.js";
16
+ } from "./chunk-DMYYQXPN.js";
14
17
  import {
15
18
  BillingDashboard,
16
19
  PricingPage,
@@ -27,8 +30,11 @@ export {
27
30
  BackendSelector,
28
31
  BillingDashboard,
29
32
  ClusterStatusBar,
33
+ CreditBalance,
30
34
  DashboardLayout,
35
+ InvoiceTable,
31
36
  NewSandboxCard,
37
+ PlanCards,
32
38
  PricingPage,
33
39
  ProfileComparison,
34
40
  ProfileSelector,
@@ -39,6 +39,51 @@ interface ClusterStatusBarProps {
39
39
  }
40
40
  declare function ClusterStatusBar({ items, latency, className }: ClusterStatusBarProps): react_jsx_runtime.JSX.Element;
41
41
 
42
+ interface CreditBalanceProps {
43
+ amount: number;
44
+ description?: string;
45
+ onTopUp?: (amount: number) => void;
46
+ quickAmounts?: number[];
47
+ className?: string;
48
+ }
49
+ declare function CreditBalance({ amount, description, onTopUp, quickAmounts, className, }: CreditBalanceProps): react_jsx_runtime.JSX.Element;
50
+
51
+ interface Invoice {
52
+ id: string;
53
+ date: string;
54
+ amount: number;
55
+ status: "paid" | "pending" | "failed";
56
+ }
57
+ interface InvoiceTableProps {
58
+ invoices: Invoice[];
59
+ onExportAll?: () => void;
60
+ onLoadMore?: () => void;
61
+ onViewInvoice?: (id: string) => void;
62
+ hasMore?: boolean;
63
+ className?: string;
64
+ }
65
+ declare function InvoiceTable({ invoices, onExportAll, onLoadMore, onViewInvoice, hasMore, className }: InvoiceTableProps): react_jsx_runtime.JSX.Element;
66
+
67
+ interface PlanFeature {
68
+ text: string;
69
+ }
70
+ interface PlanCardData {
71
+ id: string;
72
+ name: string;
73
+ price: number;
74
+ period?: string;
75
+ features: PlanFeature[];
76
+ popular?: boolean;
77
+ current?: boolean;
78
+ ctaLabel?: string;
79
+ onSelect?: (id: string) => void;
80
+ }
81
+ interface PlanCardsProps {
82
+ plans: PlanCardData[];
83
+ className?: string;
84
+ }
85
+ declare function PlanCards({ plans, className }: PlanCardsProps): react_jsx_runtime.JSX.Element;
86
+
42
87
  type ProductVariant = "sandbox";
43
88
  interface NavItem {
44
89
  id: string;
@@ -216,4 +261,4 @@ interface VariantListProps {
216
261
  }
217
262
  declare function VariantList({ variants, selectedId, onSelect, onAccept, onReject, isActioning, className, }: VariantListProps): react_jsx_runtime.JSX.Element;
218
263
 
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 };
264
+ export { AppSidebar as A, type Backend as B, ClusterStatusBar as C, DashboardLayout as D, type SidebarSandbox as E, type VariantListProps as F, type Profile as G, type PlanFeature as H, type Invoice as I, type ProductVariant as J, type Variant as K, type VariantOutcome as L, type VariantStatus as M, type NavItem as N, type PlanCardData 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, CreditBalance as f, type CreditBalanceProps as g, type DashboardLayoutProps as h, type DashboardUser as i, InvoiceTable as j, type InvoiceTableProps as k, NewSandboxCard as l, type NewSandboxCardProps as m, PlanCards as n, type PlanCardsProps as o, ProfileComparison as p, type ProfileComparisonProps as q, ProfileSelector as r, type ProfileSelectorProps as s, type ResourceMeterProps as t, type SandboxCardData as u, type SandboxCardProps as v, type SandboxStatus as w, SandboxTable as x, type SandboxTableProps as y, type SidebarNavItem 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 { 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';
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, f as CreditBalance, g as CreditBalanceProps, D as DashboardLayout, h as DashboardLayoutProps, i as DashboardUser, I as Invoice, j as InvoiceTable, k as InvoiceTableProps, N as NavItem, l as NewSandboxCard, m as NewSandboxCardProps, P as PlanCardData, n as PlanCards, o as PlanCardsProps, p as ProfileComparison, q as ProfileComparisonProps, r as ProfileSelector, s as ProfileSelectorProps, R as ResourceMeter, t as ResourceMeterProps, S as SandboxCard, u as SandboxCardData, v as SandboxCardProps, w as SandboxStatus, x as SandboxTable, y as SandboxTableProps, z as SidebarNavItem, E as SidebarSandbox, T as TopNavLink, V as VariantList, F as VariantListProps } from './index-BJIPTCKk.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,
@@ -159,15 +160,18 @@ import {
159
160
  AppSidebar,
160
161
  BackendSelector,
161
162
  ClusterStatusBar,
163
+ CreditBalance,
162
164
  DashboardLayout,
165
+ InvoiceTable,
163
166
  NewSandboxCard,
167
+ PlanCards,
164
168
  ProfileComparison,
165
169
  ProfileSelector,
166
170
  ResourceMeter,
167
171
  SandboxCard,
168
172
  SandboxTable,
169
173
  VariantList
170
- } from "./chunk-HY5IBRCE.js";
174
+ } from "./chunk-DMYYQXPN.js";
171
175
  import {
172
176
  BillingDashboard,
173
177
  PricingPage,
@@ -330,6 +334,7 @@ export {
330
334
  CodeBlock as CodeBlockDisplay,
331
335
  CommandPreview,
332
336
  CopyButton,
337
+ CreditBalance,
333
338
  DashboardLayout,
334
339
  Dialog,
335
340
  DialogClose,
@@ -371,12 +376,15 @@ export {
371
376
  InlineThinkingItem,
372
377
  InlineToolItem,
373
378
  Input,
379
+ InvoiceTable,
374
380
  Label,
381
+ LoginLayout,
375
382
  Logo,
376
383
  Markdown,
377
384
  MessageList,
378
385
  NewSandboxCard,
379
386
  OpenUIArtifactRenderer,
387
+ PlanCards,
380
388
  PricingPage as PricingCards,
381
389
  ProfileComparison,
382
390
  ProfileSelector,
package/dist/pages.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { B as BillingSubscription, a as BillingBalance, b as BillingUsage, U as UsageDataPoint, P as PricingTier } from './usage-chart-CY9xo3KX.js';
3
+ import * as React from 'react';
3
4
 
4
5
  type ProductVariant$1 = "sandbox";
5
6
  interface BillingPageData {
@@ -20,6 +21,29 @@ interface BillingPageProps {
20
21
  }
21
22
  declare function BillingPage({ variant, initialData, apiBasePath, onManageSubscription, onAddCredits, onSelectTier, fetchBillingData, }: BillingPageProps): react_jsx_runtime.JSX.Element;
22
23
 
24
+ interface EnvironmentOption {
25
+ id: string;
26
+ name: string;
27
+ description: string;
28
+ icon: React.ReactNode;
29
+ color: string;
30
+ }
31
+ interface ProvisioningWizardProps {
32
+ environments?: EnvironmentOption[];
33
+ onSubmit?: (config: ProvisioningConfig) => void;
34
+ onBack?: () => void;
35
+ className?: string;
36
+ }
37
+ interface ProvisioningConfig {
38
+ environment: string;
39
+ cpuCores: number;
40
+ ramGB: number;
41
+ storageGB: number;
42
+ modelTier: string;
43
+ systemPrompt: string;
44
+ }
45
+ declare function ProvisioningWizard({ environments, onSubmit, onBack, className, }: ProvisioningWizardProps): react_jsx_runtime.JSX.Element;
46
+
23
47
  type ProductVariant = "sandbox";
24
48
  interface StandalonePricingPageProps {
25
49
  variant?: ProductVariant;
@@ -87,4 +111,4 @@ interface ProfilesPageProps {
87
111
  }
88
112
  declare function ProfilesPage({ apiClient, tier, maxProfiles, onCompareClick, title, }: ProfilesPageProps): react_jsx_runtime.JSX.Element;
89
113
 
90
- export { BillingPage, type BillingPageData, type BillingPageProps, type ProductVariant$1 as ProductVariant, type Profile, type ProfileFormData, type ProfileMetrics, ProfilesPage, type ProfilesPageProps, StandalonePricingPage, type StandalonePricingPageProps };
114
+ export { BillingPage, type BillingPageData, type BillingPageProps, type EnvironmentOption, type ProductVariant$1 as ProductVariant, type Profile, type ProfileFormData, type ProfileMetrics, ProfilesPage, type ProfilesPageProps, type ProvisioningConfig, ProvisioningWizard, type ProvisioningWizardProps, StandalonePricingPage, type StandalonePricingPageProps };