@tangle-network/sandbox-ui 0.10.2 → 0.10.4

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.
@@ -33,6 +33,7 @@ var SIDEBAR_MODE_KEY = "sandbox-sidebar-mode";
33
33
  var SIDEBAR_RAIL_WIDTH = 64;
34
34
  var SIDEBAR_PANEL_WIDTH = 260;
35
35
  var SIDEBAR_TOTAL_WIDTH = SIDEBAR_RAIL_WIDTH + SIDEBAR_PANEL_WIDTH;
36
+ var SIDEBAR_MOBILE_WIDTH = 256;
36
37
  var SidebarContext = React.createContext(null);
37
38
  function readStorage(key, fallback) {
38
39
  if (typeof window === "undefined") return fallback;
@@ -166,8 +167,18 @@ function Sidebar({ children, className, style }) {
166
167
  }
167
168
  );
168
169
  }
169
- function SidebarRail({ children, className }) {
170
- return /* @__PURE__ */ jsx2("div", { className: cn("flex flex-col h-full w-16 shrink-0 bg-transparent", className), children });
170
+ function SidebarRail({ children, className, wide = false }) {
171
+ return /* @__PURE__ */ jsx2(
172
+ "div",
173
+ {
174
+ className: cn(
175
+ "flex flex-col h-full shrink-0 bg-transparent",
176
+ wide ? "w-full" : "w-16",
177
+ className
178
+ ),
179
+ children
180
+ }
181
+ );
171
182
  }
172
183
  function SidebarRailHeader({ children, className }) {
173
184
  return /* @__PURE__ */ jsx2("div", { className: cn("flex h-14 items-center justify-center border-b border-border", className), children });
@@ -181,7 +192,7 @@ function SidebarRailFooter({ children, className }) {
181
192
  function RailSeparator({ className }) {
182
193
  return /* @__PURE__ */ jsx2("div", { className: cn("my-2 h-px w-10 bg-[var(--md3-outline-variant)]", className) });
183
194
  }
184
- function RailButton({ icon: Icon2, label, isActive, badge, onClick, className }) {
195
+ function RailButton({ icon: Icon2, label, isActive, badge, onClick, className, showLabel }) {
185
196
  return /* @__PURE__ */ jsxs(
186
197
  "button",
187
198
  {
@@ -189,7 +200,8 @@ function RailButton({ icon: Icon2, label, isActive, badge, onClick, className })
189
200
  onClick,
190
201
  title: label,
191
202
  className: cn(
192
- "group relative flex items-center justify-center w-11 h-11 rounded-xl transition-all duration-200",
203
+ "group relative flex items-center justify-center rounded-xl transition-all duration-200",
204
+ showLabel ? "w-full justify-start px-3 h-11 gap-3" : "w-11 h-11 justify-center",
193
205
  "hover:bg-[var(--accent-surface-soft)] hover:text-[var(--accent-text)]",
194
206
  "active:scale-95",
195
207
  "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",
@@ -198,23 +210,25 @@ function RailButton({ icon: Icon2, label, isActive, badge, onClick, className })
198
210
  className
199
211
  ),
200
212
  children: [
201
- /* @__PURE__ */ jsx2(Icon2, { className: "h-5 w-5" }),
213
+ /* @__PURE__ */ jsx2(Icon2, { className: "h-5 w-5 shrink-0" }),
214
+ showLabel && /* @__PURE__ */ jsx2("span", { className: "text-sm font-medium", children: label }),
202
215
  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-primary text-[9px] font-bold text-[var(--md3-on-primary)] px-1 shadow-sm", children: badge > 99 ? "99+" : badge })
203
216
  ]
204
217
  }
205
218
  );
206
219
  }
207
- function RailModeButton({ mode, icon, label, badge, className }) {
220
+ function RailModeButton({ mode, icon, label, badge, className, showLabel }) {
208
221
  const { panelOpen, mode: currentMode, switchMode } = useSidebar();
209
222
  return /* @__PURE__ */ jsx2(
210
223
  RailButton,
211
224
  {
212
225
  icon,
213
226
  label,
227
+ isActive: mode === currentMode && panelOpen,
214
228
  badge,
215
- isActive: panelOpen && currentMode === mode,
216
229
  onClick: () => switchMode(mode),
217
- className
230
+ className,
231
+ showLabel
218
232
  }
219
233
  );
220
234
  }
@@ -243,8 +257,11 @@ function SidebarContent({ children, className }) {
243
257
  return /* @__PURE__ */ jsx2(
244
258
  "main",
245
259
  {
246
- className: cn("min-h-screen transition-[margin-left] duration-200 ease-in-out", className),
247
- style: { marginLeft: contentMargin },
260
+ className: cn(
261
+ "min-h-screen transition-[margin-left] duration-200 ease-in-out lg:ml-[var(--sb-content-margin,0px)]",
262
+ className
263
+ ),
264
+ style: { "--sb-content-margin": `${contentMargin}px` },
248
265
  children
249
266
  }
250
267
  );
@@ -351,54 +368,63 @@ function CreditBalance({
351
368
  className
352
369
  }) {
353
370
  const [topUpValue, setTopUpValue] = React2.useState("50.00");
354
- return /* @__PURE__ */ jsxs3("div", { className: cn("bg-card p-5 rounded-xl flex flex-col justify-between border border-border", className), children: [
355
- /* @__PURE__ */ jsxs3("div", { children: [
356
- /* @__PURE__ */ jsx4("h3", { className: "text-sm font-semibold text-muted-foreground uppercase tracking-widest mb-2", children: "Available Credits" }),
357
- /* @__PURE__ */ jsxs3("div", { className: "text-4xl font-extrabold text-primary tracking-tighter mb-2", children: [
358
- "$",
359
- amount.toFixed(2)
360
- ] }),
361
- /* @__PURE__ */ jsx4("p", { className: "text-sm text-muted-foreground leading-relaxed", children: description })
362
- ] }),
363
- onTopUp && /* @__PURE__ */ jsxs3("div", { className: "space-y-2.5 mt-5", children: [
364
- /* @__PURE__ */ jsxs3("div", { className: "bg-card border border-border p-1 rounded-lg flex items-center", children: [
365
- /* @__PURE__ */ jsx4(
366
- "input",
367
- {
368
- type: "text",
369
- value: `$${topUpValue}`,
370
- onChange: (e) => setTopUpValue(e.target.value.replace(/[^0-9.]/g, "")),
371
- className: "bg-transparent border-none text-foreground font-mono text-lg w-full focus:ring-0 px-4 outline-none"
372
- }
373
- ),
374
- /* @__PURE__ */ jsx4(
375
- "button",
376
- {
377
- type: "button",
378
- onClick: () => onTopUp(Number.parseFloat(topUpValue)),
379
- 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)]",
380
- children: "Top Up"
381
- }
382
- )
383
- ] }),
384
- /* @__PURE__ */ jsx4("div", { className: "flex justify-between gap-2", children: quickAmounts.map((qa) => /* @__PURE__ */ jsxs3(
385
- "button",
386
- {
387
- type: "button",
388
- onClick: () => {
389
- setTopUpValue(String(qa));
390
- onTopUp(qa);
391
- },
392
- 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",
393
- children: [
394
- "+$",
371
+ return /* @__PURE__ */ jsxs3(
372
+ "div",
373
+ {
374
+ className: cn(
375
+ "bg-card p-5 rounded-xl flex flex-col justify-between border border-border",
376
+ className
377
+ ),
378
+ children: [
379
+ /* @__PURE__ */ jsxs3("div", { children: [
380
+ /* @__PURE__ */ jsx4("h3", { className: "text-sm font-semibold text-muted-foreground uppercase tracking-widest mb-2", children: "Available Credits" }),
381
+ /* @__PURE__ */ jsxs3("div", { className: "text-4xl font-extrabold text-primary tracking-tighter mb-2", children: [
382
+ "$",
383
+ amount.toFixed(2)
384
+ ] }),
385
+ /* @__PURE__ */ jsx4("p", { className: "text-sm text-muted-foreground leading-relaxed", children: description })
386
+ ] }),
387
+ onTopUp && /* @__PURE__ */ jsxs3("div", { className: "space-y-2.5 mt-5", children: [
388
+ /* @__PURE__ */ jsxs3("div", { className: "bg-card border border-border p-1 rounded-lg flex items-center", children: [
389
+ /* @__PURE__ */ jsx4(
390
+ "input",
391
+ {
392
+ type: "text",
393
+ value: `$${topUpValue}`,
394
+ onChange: (e) => setTopUpValue(e.target.value.replace(/[^0-9.]/g, "")),
395
+ className: "bg-transparent border-none text-foreground font-mono text-lg w-full focus:ring-0 px-4 outline-none"
396
+ }
397
+ ),
398
+ /* @__PURE__ */ jsx4(
399
+ "button",
400
+ {
401
+ type: "button",
402
+ onClick: () => onTopUp(Number.parseFloat(topUpValue)),
403
+ 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
+ children: "Top Up"
405
+ }
406
+ )
407
+ ] }),
408
+ /* @__PURE__ */ jsx4("div", { className: "flex justify-between gap-2", children: quickAmounts.map((qa) => /* @__PURE__ */ jsxs3(
409
+ "button",
410
+ {
411
+ type: "button",
412
+ onClick: () => {
413
+ setTopUpValue(String(qa));
414
+ onTopUp(qa);
415
+ },
416
+ 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
+ children: [
418
+ "+$",
419
+ qa
420
+ ]
421
+ },
395
422
  qa
396
- ]
397
- },
398
- qa
399
- )) })
400
- ] })
401
- ] });
423
+ )) })
424
+ ] })
425
+ ]
426
+ }
427
+ );
402
428
  }
403
429
 
404
430
  // src/dashboard/invoice-table.tsx
@@ -576,58 +602,86 @@ function DashboardLayoutInner({
576
602
  }, [notificationsOpen]);
577
603
  const { contentMargin, hidden, mode, hasPanels, panelOpen } = useSidebar();
578
604
  const modeSet = React3.useMemo(() => new Set(modeItems), [modeItems]);
579
- const sidebarUser = user ? { email: user.email, name: user.name, tier: user.tier, avatarUrl: user.avatarUrl } : void 0;
605
+ const sidebarUser = React3.useMemo(
606
+ () => user ? { email: user.email, name: user.name, tier: user.tier, avatarUrl: user.avatarUrl } : void 0,
607
+ [user?.email, user?.name, user?.tier, user?.avatarUrl]
608
+ );
580
609
  const activePanel = panels.find((p) => p.mode === mode);
581
- const sidebarContent = /* @__PURE__ */ jsxs6(Fragment4, { children: [
582
- /* @__PURE__ */ jsxs6(SidebarRail, { children: [
583
- /* @__PURE__ */ jsx7(SidebarRailHeader, { children: /* @__PURE__ */ jsx7(Link, { href: "/", to: "/", className: "p-1 rounded-md transition-colors hover:bg-muted/50", children: /* @__PURE__ */ jsx7(Logo, { variant, size: "sm", iconOnly: true }) }) }),
584
- /* @__PURE__ */ jsx7(SidebarRailNav, { children: navItems.map((item, i) => {
585
- const isMode = modeSet.has(item.id);
586
- const prevIsMode = i > 0 && modeSet.has(navItems[i - 1].id);
587
- const showSep = i > 0 && isMode && !prevIsMode;
588
- return /* @__PURE__ */ jsxs6(React3.Fragment, { children: [
589
- showSep && /* @__PURE__ */ jsx7(RailSeparator, {}),
590
- isMode ? /* @__PURE__ */ jsx7(
591
- RailModeButton,
592
- {
593
- mode: item.id,
594
- icon: item.icon,
595
- label: item.label,
596
- badge: item.badge
597
- }
598
- ) : /* @__PURE__ */ jsx7(Link, { href: item.href, to: item.href, children: /* @__PURE__ */ jsx7(
599
- RailButton,
610
+ const buildSidebarContent = React3.useCallback(
611
+ (showLabels) => /* @__PURE__ */ jsxs6(Fragment4, { children: [
612
+ /* @__PURE__ */ jsxs6(SidebarRail, { wide: showLabels, children: [
613
+ /* @__PURE__ */ jsx7(SidebarRailHeader, { children: /* @__PURE__ */ jsx7(Link, { href: "/", to: "/", className: "p-1 rounded-md transition-colors hover:bg-muted/50", children: /* @__PURE__ */ jsx7(Logo, { variant, size: "sm", iconOnly: true }) }) }),
614
+ /* @__PURE__ */ jsx7(SidebarRailNav, { children: navItems.map((item, i) => {
615
+ const isMode = modeSet.has(item.id);
616
+ const prevIsMode = i > 0 && modeSet.has(navItems[i - 1].id);
617
+ const showSep = i > 0 && isMode && !prevIsMode;
618
+ return /* @__PURE__ */ jsxs6(React3.Fragment, { children: [
619
+ showSep && /* @__PURE__ */ jsx7(RailSeparator, {}),
620
+ isMode ? /* @__PURE__ */ jsx7(
621
+ RailModeButton,
622
+ {
623
+ mode: item.id,
624
+ icon: item.icon,
625
+ label: item.label,
626
+ badge: item.badge,
627
+ showLabel: showLabels
628
+ }
629
+ ) : /* @__PURE__ */ jsx7(Link, { href: item.href, to: item.href, children: /* @__PURE__ */ jsx7(
630
+ RailButton,
631
+ {
632
+ icon: item.icon,
633
+ label: item.label,
634
+ isActive: activeNavId === item.id,
635
+ showLabel: showLabels
636
+ }
637
+ ) })
638
+ ] }, item.id);
639
+ }) }),
640
+ /* @__PURE__ */ jsxs6(SidebarRailFooter, { children: [
641
+ onSettingsClick ? /* @__PURE__ */ jsx7(RailButton, { icon: SettingsIconSmall, label: "Settings", onClick: onSettingsClick, showLabel: showLabels }) : /* @__PURE__ */ jsx7(Link, { href: settingsHref, to: settingsHref, children: /* @__PURE__ */ jsx7(RailButton, { icon: SettingsIconSmall, label: "Settings", showLabel: showLabels }) }),
642
+ railFooter,
643
+ /* @__PURE__ */ jsx7(RailSeparator, {}),
644
+ /* @__PURE__ */ jsx7(
645
+ ProfileAvatar,
600
646
  {
601
- icon: item.icon,
602
- label: item.label,
603
- isActive: activeNavId === item.id
647
+ user: sidebarUser,
648
+ isLoading,
649
+ onLogout,
650
+ onSettingsClick,
651
+ settingsHref,
652
+ LinkComponent,
653
+ children: profileMenuItems
604
654
  }
605
- ) })
606
- ] }, item.id);
607
- }) }),
608
- /* @__PURE__ */ jsxs6(SidebarRailFooter, { children: [
609
- onSettingsClick ? /* @__PURE__ */ jsx7(RailButton, { icon: SettingsIconSmall, label: "Settings", onClick: onSettingsClick }) : /* @__PURE__ */ jsx7(Link, { href: settingsHref, to: settingsHref, children: /* @__PURE__ */ jsx7(RailButton, { icon: SettingsIconSmall, label: "Settings" }) }),
610
- railFooter,
611
- /* @__PURE__ */ jsx7(RailSeparator, {}),
612
- /* @__PURE__ */ jsx7(
613
- ProfileAvatar,
614
- {
615
- user: sidebarUser,
616
- isLoading,
617
- onLogout,
618
- onSettingsClick,
619
- settingsHref,
620
- LinkComponent,
621
- children: profileMenuItems
622
- }
623
- )
655
+ )
656
+ ] })
657
+ ] }),
658
+ panels.length > 0 && /* @__PURE__ */ jsxs6(SidebarPanel, { children: [
659
+ /* @__PURE__ */ jsx7(SidebarPanelHeader, { title: activePanel?.title ?? mode }),
660
+ /* @__PURE__ */ jsx7(SidebarPanelContent, { children: activePanel?.content })
624
661
  ] })
625
662
  ] }),
626
- panels.length > 0 && /* @__PURE__ */ jsxs6(SidebarPanel, { children: [
627
- /* @__PURE__ */ jsx7(SidebarPanelHeader, { title: activePanel?.title ?? mode }),
628
- /* @__PURE__ */ jsx7(SidebarPanelContent, { children: activePanel?.content })
629
- ] })
630
- ] });
663
+ // biome-ignore lint/correctness/useExhaustiveDependencies: intentional only the inputs that actually affect the sidebar tree
664
+ [
665
+ Link,
666
+ variant,
667
+ navItems,
668
+ modeSet,
669
+ activeNavId,
670
+ onSettingsClick,
671
+ settingsHref,
672
+ railFooter,
673
+ sidebarUser,
674
+ isLoading,
675
+ onLogout,
676
+ LinkComponent,
677
+ profileMenuItems,
678
+ panels,
679
+ activePanel,
680
+ mode
681
+ ]
682
+ );
683
+ const sidebarContent = React3.useMemo(() => buildSidebarContent(false), [buildSidebarContent]);
684
+ const mobileSidebarContent = React3.useMemo(() => buildSidebarContent(true), [buildSidebarContent]);
631
685
  return /* @__PURE__ */ jsxs6("div", { className: cn("min-h-screen bg-background text-foreground", className), children: [
632
686
  /* @__PURE__ */ jsxs6(
633
687
  "nav",
@@ -638,19 +692,22 @@ function DashboardLayoutInner({
638
692
  width: hidden ? "100%" : `calc(100% - ${contentMargin}px)`
639
693
  },
640
694
  children: [
641
- /* @__PURE__ */ jsx7("div", { className: "flex items-center gap-8", children: topNavLinks && topNavLinks.length > 0 && /* @__PURE__ */ jsx7("div", { className: "hidden md:flex gap-6", children: topNavLinks.map((link) => /* @__PURE__ */ jsx7(
642
- Link,
643
- {
644
- href: link.href,
645
- to: link.href,
646
- className: cn(
647
- "transition-all duration-300 px-2 py-1 rounded",
648
- activeTopNavHref === link.href ? "text-foreground border-b-2 border-primary pb-1" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"
649
- ),
650
- children: link.label
651
- },
652
- link.href
653
- )) }) }),
695
+ /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-8", children: [
696
+ /* @__PURE__ */ jsx7(Link, { href: "/", to: "/", className: "lg:hidden flex items-center p-1 rounded-md hover:bg-muted/50 transition-colors", children: /* @__PURE__ */ jsx7(Logo, { variant, size: "sm", iconOnly: true }) }),
697
+ topNavLinks && topNavLinks.length > 0 && /* @__PURE__ */ jsx7("div", { className: "hidden md:flex gap-6", children: topNavLinks.map((link) => /* @__PURE__ */ jsx7(
698
+ Link,
699
+ {
700
+ href: link.href,
701
+ to: link.href,
702
+ className: cn(
703
+ "transition-all duration-300 px-2 py-1 rounded",
704
+ activeTopNavHref === link.href ? "text-foreground border-b-2 border-primary pb-1" : "text-muted-foreground hover:text-foreground hover:bg-muted/50"
705
+ ),
706
+ children: link.label
707
+ },
708
+ link.href
709
+ )) })
710
+ ] }),
654
711
  /* @__PURE__ */ jsxs6("div", { className: "flex items-center gap-4", children: [
655
712
  onNewSandbox && /* @__PURE__ */ jsxs6(
656
713
  "button",
@@ -742,13 +799,14 @@ function DashboardLayoutInner({
742
799
  "fixed top-14 bottom-0 left-0 z-30 flex bg-background transition-transform duration-200 lg:hidden",
743
800
  mobileMenuOpen ? "translate-x-0" : "-translate-x-full"
744
801
  ),
745
- style: { width: panelOpen && hasPanels ? SIDEBAR_TOTAL_WIDTH : SIDEBAR_RAIL_WIDTH },
746
- children: sidebarContent
802
+ style: {
803
+ width: panelOpen && hasPanels ? SIDEBAR_MOBILE_WIDTH + SIDEBAR_PANEL_WIDTH : SIDEBAR_MOBILE_WIDTH
804
+ },
805
+ children: mobileSidebarContent
747
806
  }
748
807
  ),
749
808
  /* @__PURE__ */ jsx7(Sidebar, { className: cn("hidden lg:flex", sidebarClassName), children: sidebarContent }),
750
- /* @__PURE__ */ jsx7(SidebarContent, { className: cn("pt-16 px-8 pb-8 hidden lg:block bg-background", contentClassName), children }),
751
- /* @__PURE__ */ jsx7("main", { className: cn("pt-16 px-6 pb-8 min-h-screen lg:hidden bg-background", contentClassName), children }),
809
+ /* @__PURE__ */ jsx7(SidebarContent, { className: cn("pt-16 px-6 pb-8 lg:px-8 bg-background", contentClassName), children }),
752
810
  footer
753
811
  ] });
754
812
  }
@@ -1547,6 +1605,7 @@ export {
1547
1605
  SIDEBAR_RAIL_WIDTH,
1548
1606
  SIDEBAR_PANEL_WIDTH,
1549
1607
  SIDEBAR_TOTAL_WIDTH,
1608
+ SIDEBAR_MOBILE_WIDTH,
1550
1609
  SidebarProvider,
1551
1610
  useSidebar,
1552
1611
  Sidebar,
@@ -1,4 +1,4 @@
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, ag 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, ah 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_PANEL_WIDTH, G as SIDEBAR_RAIL_WIDTH, H as SIDEBAR_TOTAL_WIDTH, J as SandboxCard, K as SandboxCardData, L as SandboxCardProps, M as SandboxStatus, O as SandboxTable, Q as SandboxTableProps, T as Sidebar, U as SidebarContent, V as SidebarContentProps, W as SidebarPanel, X as SidebarPanelContent, Y as SidebarPanelContentProps, Z as SidebarPanelHeader, _ as SidebarPanelHeaderProps, $ as SidebarPanelProps, a0 as SidebarProps, a1 as SidebarProvider, a2 as SidebarProviderProps, a3 as SidebarRail, a4 as SidebarRailFooter, a5 as SidebarRailFooterProps, a6 as SidebarRailHeader, a7 as SidebarRailHeaderProps, a8 as SidebarRailNav, a9 as SidebarRailNavProps, aa as SidebarRailProps, ab as SidebarUser, ai as Variant, ad as VariantList, ae as VariantListProps, aj as VariantOutcome, ak as VariantStatus, af as useSidebar } from './variant-list-BNwUOSgz.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 Variant, ae as VariantList, af as VariantListProps, ak as VariantOutcome, al as VariantStatus, ag as useSidebar } from './variant-list-DHP2OXFE.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-SSiOgeQI.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';
package/dist/dashboard.js CHANGED
@@ -17,6 +17,7 @@ import {
17
17
  RailModeButton,
18
18
  RailSeparator,
19
19
  ResourceMeter,
20
+ SIDEBAR_MOBILE_WIDTH,
20
21
  SIDEBAR_PANEL_WIDTH,
21
22
  SIDEBAR_RAIL_WIDTH,
22
23
  SIDEBAR_TOTAL_WIDTH,
@@ -34,7 +35,7 @@ import {
34
35
  SidebarRailNav,
35
36
  VariantList,
36
37
  useSidebar
37
- } from "./chunk-2XCOGNZP.js";
38
+ } from "./chunk-XQF6LQDV.js";
38
39
  import {
39
40
  BillingDashboard,
40
41
  PricingPage,
@@ -944,6 +945,7 @@ export {
944
945
  RailModeButton,
945
946
  RailSeparator,
946
947
  ResourceMeter,
948
+ SIDEBAR_MOBILE_WIDTH,
947
949
  SIDEBAR_PANEL_WIDTH,
948
950
  SIDEBAR_RAIL_WIDTH,
949
951
  SIDEBAR_TOTAL_WIDTH,
package/dist/globals.css CHANGED
@@ -705,6 +705,9 @@
705
705
  .-top-1 {
706
706
  top: calc(var(--spacing) * -1);
707
707
  }
708
+ .-top-1\.5 {
709
+ top: calc(var(--spacing) * -1.5);
710
+ }
708
711
  .-top-4 {
709
712
  top: calc(var(--spacing) * -4);
710
713
  }
@@ -744,6 +747,9 @@
744
747
  .-right-1 {
745
748
  right: calc(var(--spacing) * -1);
746
749
  }
750
+ .-right-1\.5 {
751
+ right: calc(var(--spacing) * -1.5);
752
+ }
747
753
  .right-0 {
748
754
  right: calc(var(--spacing) * 0);
749
755
  }
@@ -1164,9 +1170,6 @@
1164
1170
  .min-h-\[200px\] {
1165
1171
  min-height: 200px;
1166
1172
  }
1167
- .min-h-\[240px\] {
1168
- min-height: 240px;
1169
- }
1170
1173
  .min-h-full {
1171
1174
  min-height: 100%;
1172
1175
  }
@@ -1631,6 +1634,9 @@
1631
1634
  .justify-end {
1632
1635
  justify-content: flex-end;
1633
1636
  }
1637
+ .justify-start {
1638
+ justify-content: flex-start;
1639
+ }
1634
1640
  .gap-0\.5 {
1635
1641
  gap: calc(var(--spacing) * 0.5);
1636
1642
  }
@@ -2122,21 +2128,12 @@
2122
2128
  .bg-\[\#8E59FF\] {
2123
2129
  background-color: #8E59FF;
2124
2130
  }
2125
- .bg-\[\#27c93f\]\/80 {
2126
- background-color: color-mix(in oklab, #27c93f 80%, transparent);
2127
- }
2128
2131
  .bg-\[\#FEBC2E\] {
2129
2132
  background-color: #FEBC2E;
2130
2133
  }
2131
2134
  .bg-\[\#FF5F57\] {
2132
2135
  background-color: #FF5F57;
2133
2136
  }
2134
- .bg-\[\#ff5f56\]\/80 {
2135
- background-color: color-mix(in oklab, #ff5f56 80%, transparent);
2136
- }
2137
- .bg-\[\#ffbd2e\]\/80 {
2138
- background-color: color-mix(in oklab, #ffbd2e 80%, transparent);
2139
- }
2140
2137
  .bg-\[color\:color-mix\(in_srgb\,var\(--bg-card\)_94\%\,transparent\)\] {
2141
2138
  background-color: var(--bg-card);
2142
2139
  @supports (color: color-mix(in lab, red, red)) {
@@ -2406,9 +2403,6 @@
2406
2403
  .bg-\[linear-gradient\(180deg\,rgba\(255\,255\,255\,0\.04\)\,transparent\)\] {
2407
2404
  background-image: linear-gradient(180deg,rgba(255,255,255,0.04),transparent);
2408
2405
  }
2409
- .bg-\[radial-gradient\(circle_at_top\,rgba\(173\,163\,255\,0\.05\)_0\,transparent_100\%\)\] {
2410
- background-image: radial-gradient(circle at top,rgba(173,163,255,0.05) 0,transparent 100%);
2411
- }
2412
2406
  .from-white\/5 {
2413
2407
  --tw-gradient-from: color-mix(in srgb, #fff 5%, transparent);
2414
2408
  @supports (color: color-mix(in lab, red, red)) {
@@ -2648,9 +2642,6 @@
2648
2642
  .pl-2 {
2649
2643
  padding-left: calc(var(--spacing) * 2);
2650
2644
  }
2651
- .pl-3 {
2652
- padding-left: calc(var(--spacing) * 3);
2653
- }
2654
2645
  .pl-4 {
2655
2646
  padding-left: calc(var(--spacing) * 4);
2656
2647
  }
@@ -4183,9 +4174,9 @@
4183
4174
  grid-column: span 1 / span 1;
4184
4175
  }
4185
4176
  }
4186
- .lg\:block {
4177
+ .lg\:ml-\[var\(--sb-content-margin\,0px\)\] {
4187
4178
  @media (width >= 64rem) {
4188
- display: block;
4179
+ margin-left: var(--sb-content-margin,0px);
4189
4180
  }
4190
4181
  }
4191
4182
  .lg\:flex {
@@ -4223,6 +4214,11 @@
4223
4214
  padding: calc(var(--spacing) * 4);
4224
4215
  }
4225
4216
  }
4217
+ .lg\:px-8 {
4218
+ @media (width >= 64rem) {
4219
+ padding-inline: calc(var(--spacing) * 8);
4220
+ }
4221
+ }
4226
4222
  .xl\:col-span-4 {
4227
4223
  @media (width >= 80rem) {
4228
4224
  grid-column: span 4 / span 4;
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@ 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_PANEL_WIDTH, G as SIDEBAR_RAIL_WIDTH, H as SIDEBAR_TOTAL_WIDTH, J as SandboxCard, K as SandboxCardData, L as SandboxCardProps, M as SandboxStatus, O as SandboxTable, Q as SandboxTableProps, T as Sidebar, U as SidebarContent, V as SidebarContentProps, W as SidebarPanel, X as SidebarPanelContent, Y as SidebarPanelContentProps, Z as SidebarPanelHeader, _ as SidebarPanelHeaderProps, $ as SidebarPanelProps, a0 as SidebarProps, a1 as SidebarProvider, a2 as SidebarProviderProps, a3 as SidebarRail, a4 as SidebarRailFooter, a5 as SidebarRailFooterProps, a6 as SidebarRailHeader, a7 as SidebarRailHeaderProps, a8 as SidebarRailNav, a9 as SidebarRailNavProps, aa as SidebarRailProps, ab as SidebarUser, ac as TopNavLink, ad as VariantList, ae as VariantListProps, af as useSidebar } from './variant-list-BNwUOSgz.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
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';
20
20
  export { AuthHeader, GitHubLoginButton, LoginLayout, LoginLayoutProps, UserMenu } from './auth.js';
21
21
  export { CodeBlock, CodeBlock as CodeBlockDisplay, CopyButton, Markdown, MarkdownProps } from './markdown.js';
package/dist/index.js CHANGED
@@ -195,6 +195,7 @@ import {
195
195
  RailModeButton,
196
196
  RailSeparator,
197
197
  ResourceMeter,
198
+ SIDEBAR_MOBILE_WIDTH,
198
199
  SIDEBAR_PANEL_WIDTH,
199
200
  SIDEBAR_RAIL_WIDTH,
200
201
  SIDEBAR_TOTAL_WIDTH,
@@ -212,7 +213,7 @@ import {
212
213
  SidebarRailNav,
213
214
  VariantList,
214
215
  useSidebar
215
- } from "./chunk-2XCOGNZP.js";
216
+ } from "./chunk-XQF6LQDV.js";
216
217
  import {
217
218
  BillingDashboard,
218
219
  PricingPage,
@@ -449,6 +450,7 @@ export {
449
450
  ResourceMeter,
450
451
  RunGroup,
451
452
  RuntimePane,
453
+ SIDEBAR_MOBILE_WIDTH,
452
454
  SIDEBAR_PANEL_WIDTH,
453
455
  SIDEBAR_RAIL_WIDTH,
454
456
  SIDEBAR_TOTAL_WIDTH,
package/dist/pages.d.ts CHANGED
@@ -39,6 +39,32 @@ interface ResourceLimits {
39
39
  ramMaxGB?: number;
40
40
  storageMaxGB?: number;
41
41
  }
42
+ interface ModelOption {
43
+ value: string;
44
+ label: string;
45
+ disabled?: boolean;
46
+ }
47
+ interface PricingRates {
48
+ cpuPerHr: number;
49
+ ramPerGbHr: number;
50
+ diskPerGbHr: number;
51
+ minChargePerHr?: number;
52
+ }
53
+ /**
54
+ * Describes one selectable plan tier for the purpose of badging locked
55
+ * presets with the *correct* upgrade target. Without this, every locked
56
+ * preset shows "Pro" — wrong for a user who is already on Pro and whose
57
+ * next step up is Enterprise.
58
+ */
59
+ interface PlanTierInfo {
60
+ /** Stable id (e.g. "free" | "pro" | "enterprise") */
61
+ id: string;
62
+ /** Short badge label shown on locked presets (e.g. "Pro", "Enterprise") */
63
+ label: string;
64
+ cpuMax: number;
65
+ ramMaxGB: number;
66
+ storageMaxGB: number;
67
+ }
42
68
  interface ProvisioningWizardProps {
43
69
  environments?: EnvironmentOption[];
44
70
  onLoadEnvironments?: () => Promise<EnvironmentEntry[]>;
@@ -56,6 +82,16 @@ interface ProvisioningWizardProps {
56
82
  onLoadStartupScripts?: () => Promise<StartupScriptEntry[]>;
57
83
  /** Plan-based resource limits — caps the slider maximums */
58
84
  resourceLimits?: ResourceLimits;
85
+ /** Override the list of model engines shown in step 3 */
86
+ modelOptions?: ModelOption[];
87
+ /** Real pricing rates from the API for accurate cost calculation */
88
+ pricingRates?: PricingRates;
89
+ /**
90
+ * Ordered list of plan tiers (smallest to largest). When provided,
91
+ * locked presets are badged with the label of the smallest tier that
92
+ * would unlock them. Falls back to a generic "Pro" badge when omitted.
93
+ */
94
+ planTiers?: PlanTierInfo[];
59
95
  }
60
96
  interface StartupScriptEntry {
61
97
  id: string;
@@ -82,7 +118,7 @@ interface ProvisioningConfig {
82
118
  startupScriptIds?: string[];
83
119
  }
84
120
  declare function resolveEnvironment(env: EnvironmentEntry): EnvironmentOption;
85
- declare function ProvisioningWizard({ environments: environmentsProp, onLoadEnvironments, onSubmit, onBack, className, variant, defaultEnvironment, defaultConfig, skipToReview, onLoadStartupScripts, resourceLimits, }: ProvisioningWizardProps): react_jsx_runtime.JSX.Element;
121
+ declare function ProvisioningWizard({ environments: environmentsProp, onLoadEnvironments, onSubmit, onBack, className, variant, defaultEnvironment, defaultConfig, skipToReview, onLoadStartupScripts, resourceLimits, modelOptions, pricingRates, planTiers, }: ProvisioningWizardProps): react_jsx_runtime.JSX.Element;
86
122
 
87
123
  type ProductVariant = "sandbox";
88
124
  interface StandalonePricingPageProps {
@@ -234,4 +270,4 @@ type TemplateCategory = "blockchain" | "ai-ml" | "frontend" | "infrastructure" |
234
270
  type TemplatePreset = Omit<ProvisioningConfig, "name" | "gitUrl" | "envVars" | "driver" | "startupScriptIds">;
235
271
  declare function getPresetForTemplate(id: string): TemplatePreset;
236
272
 
237
- export { BillingPage, type BillingPageData, type BillingPageProps, type EnvironmentEntry, type EnvironmentOption, PricingTier, type ProductVariant$1 as ProductVariant, type Profile, type ProfileFormData, type ProfileMetrics, ProfilesPage, type ProfilesPageProps, type ProvisioningConfig, ProvisioningWizard, type ProvisioningWizardProps, type ResourceLimits, type ScriptType, type Secret, type SecretsApiClient, SecretsPage, type SecretsPageProps, StandalonePricingPage, type StandalonePricingPageProps, type StartupScript, type StartupScriptEntry, type StartupScriptFormData, type StartupScriptsApiClient, StartupScriptsPage, type StartupScriptsPageProps, type TemplateCategory, type TemplatePreset, TemplatesPage, type TemplatesPageProps, getPresetForTemplate, resolveEnvironment };
273
+ export { BillingPage, type BillingPageData, type BillingPageProps, type EnvironmentEntry, type EnvironmentOption, type ModelOption, type PlanTierInfo, type PricingRates, PricingTier, type ProductVariant$1 as ProductVariant, type Profile, type ProfileFormData, type ProfileMetrics, ProfilesPage, type ProfilesPageProps, type ProvisioningConfig, ProvisioningWizard, type ProvisioningWizardProps, type ResourceLimits, type ScriptType, type Secret, type SecretsApiClient, SecretsPage, type SecretsPageProps, StandalonePricingPage, type StandalonePricingPageProps, type StartupScript, type StartupScriptEntry, type StartupScriptFormData, type StartupScriptsApiClient, StartupScriptsPage, type StartupScriptsPageProps, type TemplateCategory, type TemplatePreset, TemplatesPage, type TemplatesPageProps, getPresetForTemplate, resolveEnvironment };