@tangle-network/sandbox-ui 0.3.12 → 0.4.0

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.
@@ -1,16 +1,14 @@
1
1
  import {
2
2
  Avatar,
3
3
  AvatarFallback,
4
- AvatarImage
5
- } from "./chunk-B26TQ7SA.js";
6
- import {
4
+ AvatarImage,
7
5
  DropdownMenu,
8
6
  DropdownMenuContent,
9
7
  DropdownMenuItem,
10
8
  DropdownMenuLabel,
11
9
  DropdownMenuSeparator,
12
10
  DropdownMenuTrigger
13
- } from "./chunk-MCGKDCOR.js";
11
+ } from "./chunk-IW2JZCOC.js";
14
12
  import {
15
13
  Button
16
14
  } from "./chunk-HWLX5NME.js";
@@ -679,6 +679,98 @@ function UploadProgress({ files, onRemove, onRetry, className }) {
679
679
  )) });
680
680
  }
681
681
 
682
+ // src/primitives/sidebar-drop-zone.tsx
683
+ import { useCallback as useCallback3, useRef as useRef3, useState as useState4 } from "react";
684
+ import { Upload } from "lucide-react";
685
+ import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
686
+ function SidebarDropZone({
687
+ onDrop,
688
+ accept,
689
+ disabled,
690
+ title = "Drop files here",
691
+ description,
692
+ icon,
693
+ persistent = false,
694
+ className
695
+ }) {
696
+ const [dragOver, setDragOver] = useState4(false);
697
+ const counter = useRef3(0);
698
+ const isAccepted = useCallback3(
699
+ (file) => {
700
+ if (!accept) return true;
701
+ const extensions = accept.split(",").map((ext) => ext.trim().toLowerCase());
702
+ const fileName = file.name.toLowerCase();
703
+ return extensions.some((ext) => fileName.endsWith(ext));
704
+ },
705
+ [accept]
706
+ );
707
+ const handleDragEnter = useCallback3(
708
+ (e) => {
709
+ e.preventDefault();
710
+ e.stopPropagation();
711
+ if (disabled) return;
712
+ counter.current++;
713
+ if (e.dataTransfer?.types.includes("Files")) setDragOver(true);
714
+ },
715
+ [disabled]
716
+ );
717
+ const handleDragLeave = useCallback3((e) => {
718
+ e.preventDefault();
719
+ e.stopPropagation();
720
+ counter.current--;
721
+ if (counter.current === 0) setDragOver(false);
722
+ }, []);
723
+ const handleDragOver = useCallback3(
724
+ (e) => {
725
+ e.preventDefault();
726
+ e.stopPropagation();
727
+ if (!disabled) e.dataTransfer.dropEffect = "copy";
728
+ },
729
+ [disabled]
730
+ );
731
+ const handleDrop = useCallback3(
732
+ (e) => {
733
+ e.preventDefault();
734
+ e.stopPropagation();
735
+ counter.current = 0;
736
+ setDragOver(false);
737
+ if (disabled) return;
738
+ const allFiles = Array.from(e.dataTransfer?.files || []);
739
+ const accepted = accept ? allFiles.filter(isAccepted) : allFiles;
740
+ if (accepted.length > 0) onDrop(accepted);
741
+ },
742
+ [disabled, accept, isAccepted, onDrop]
743
+ );
744
+ const isVisible = persistent || dragOver;
745
+ return /* @__PURE__ */ jsx9(
746
+ "div",
747
+ {
748
+ onDragEnter: handleDragEnter,
749
+ onDragLeave: handleDragLeave,
750
+ onDragOver: handleDragOver,
751
+ onDrop: handleDrop,
752
+ className: cn(
753
+ "rounded-lg border-2 border-dashed transition-all duration-150",
754
+ isVisible ? "p-4" : "p-0 border-transparent",
755
+ dragOver ? "border-[var(--brand-cool,hsl(var(--ring)))] bg-[var(--brand-cool,hsl(var(--primary)))]/8" : persistent ? "border-[var(--border-subtle,hsl(var(--border)))] bg-transparent hover:border-[var(--border-default,hsl(var(--border)))] hover:bg-[var(--bg-hover,hsl(var(--accent)))]/50" : "",
756
+ disabled && "opacity-50 pointer-events-none",
757
+ className
758
+ ),
759
+ children: isVisible && /* @__PURE__ */ jsxs7("div", { className: "flex flex-col items-center gap-2 text-center", children: [
760
+ /* @__PURE__ */ jsx9("div", { className: cn(
761
+ "flex h-8 w-8 items-center justify-center rounded-lg transition-colors",
762
+ dragOver ? "bg-[var(--brand-cool,hsl(var(--primary)))]/15 text-[var(--brand-cool,hsl(var(--primary)))]" : "text-[var(--text-muted,hsl(var(--muted-foreground)))]"
763
+ ), children: icon ?? /* @__PURE__ */ jsx9(Upload, { className: "h-4 w-4" }) }),
764
+ /* @__PURE__ */ jsx9("p", { className: cn(
765
+ "text-xs font-medium",
766
+ dragOver ? "text-[var(--text-primary,hsl(var(--foreground)))]" : "text-[var(--text-muted,hsl(var(--muted-foreground)))]"
767
+ ), children: title }),
768
+ description && /* @__PURE__ */ jsx9("p", { className: "text-[10px] text-[var(--text-muted,hsl(var(--muted-foreground)))]", children: description })
769
+ ] })
770
+ }
771
+ );
772
+ }
773
+
682
774
  export {
683
775
  Select,
684
776
  SelectGroup,
@@ -701,5 +793,6 @@ export {
701
793
  TerminalCursor,
702
794
  TerminalInput,
703
795
  DropZone,
704
- UploadProgress
796
+ UploadProgress,
797
+ SidebarDropZone
705
798
  };
@@ -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, 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';
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 './index-tTfThG0n.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
@@ -1,5 +1,4 @@
1
1
  import {
2
- AppSidebar,
3
2
  BackendSelector,
4
3
  ClusterStatusBar,
5
4
  CreditBalance,
@@ -7,26 +6,43 @@ import {
7
6
  InvoiceTable,
8
7
  NewSandboxCard,
9
8
  PlanCards,
9
+ ProfileAvatar,
10
10
  ProfileComparison,
11
11
  ProfileSelector,
12
+ RailButton,
13
+ RailModeButton,
14
+ RailSeparator,
12
15
  ResourceMeter,
16
+ SIDEBAR_PANEL_WIDTH,
17
+ SIDEBAR_RAIL_WIDTH,
18
+ SIDEBAR_TOTAL_WIDTH,
13
19
  SandboxCard,
14
20
  SandboxTable,
15
- VariantList
16
- } from "./chunk-DMYYQXPN.js";
21
+ Sidebar,
22
+ SidebarContent,
23
+ SidebarPanel,
24
+ SidebarPanelContent,
25
+ SidebarPanelHeader,
26
+ SidebarProvider,
27
+ SidebarRail,
28
+ SidebarRailFooter,
29
+ SidebarRailHeader,
30
+ SidebarRailNav,
31
+ VariantList,
32
+ useSidebar
33
+ } from "./chunk-MVYFNPAH.js";
17
34
  import {
18
35
  BillingDashboard,
19
36
  PricingPage,
20
37
  UsageChart
21
38
  } from "./chunk-ZP6GSX4D.js";
22
39
  import "./chunk-OKCIKTXQ.js";
23
- import "./chunk-MCGKDCOR.js";
40
+ import "./chunk-IW2JZCOC.js";
24
41
  import "./chunk-FRGMMANX.js";
25
42
  import "./chunk-MXCSSOGH.js";
26
43
  import "./chunk-HWLX5NME.js";
27
44
  import "./chunk-RQHJBTEU.js";
28
45
  export {
29
- AppSidebar,
30
46
  BackendSelector,
31
47
  BillingDashboard,
32
48
  ClusterStatusBar,
@@ -36,11 +52,29 @@ export {
36
52
  NewSandboxCard,
37
53
  PlanCards,
38
54
  PricingPage,
55
+ ProfileAvatar,
39
56
  ProfileComparison,
40
57
  ProfileSelector,
58
+ RailButton,
59
+ RailModeButton,
60
+ RailSeparator,
41
61
  ResourceMeter,
62
+ SIDEBAR_PANEL_WIDTH,
63
+ SIDEBAR_RAIL_WIDTH,
64
+ SIDEBAR_TOTAL_WIDTH,
42
65
  SandboxCard,
43
66
  SandboxTable,
67
+ Sidebar,
68
+ SidebarContent,
69
+ SidebarPanel,
70
+ SidebarPanelContent,
71
+ SidebarPanelHeader,
72
+ SidebarProvider,
73
+ SidebarRail,
74
+ SidebarRailFooter,
75
+ SidebarRailHeader,
76
+ SidebarRailNav,
44
77
  UsageChart,
45
- VariantList
78
+ VariantList,
79
+ useSidebar
46
80
  };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
  import {
3
3
  DocumentEditorPane
4
- } from "./chunk-4HT5J6CE.js";
4
+ } from "./chunk-HXEA7L2T.js";
5
5
  import "./chunk-Q56BYXQF.js";
6
6
  import "./chunk-W4LM3QYZ.js";
7
7
  import "./chunk-LTFK464G.js";
@@ -121,4 +121,4 @@ interface DocumentEditorPaneProps extends Omit<ArtifactPaneProps, "children" | "
121
121
  */
122
122
  declare function DocumentEditorPane({ eyebrow, title, subtitle, meta, headerActions, footer, className, contentClassName, tabs, toolbar, markdown, mode, defaultMode, onModeChange, backend, placeholder, autoFocus, readOnly, onChange, onSave, saving, saveLabel, previewClassName, editorClassName, collaboration, }: DocumentEditorPaneProps): react_jsx_runtime.JSX.Element;
123
123
 
124
- export { type Collaborator as C, type DocumentEditorBackend as D, type EditorContextValue as E, type ConnectionState as a, type DocumentEditorMode as b, DocumentEditorPane as c, type DocumentEditorPaneCollaborationConfig as d, type DocumentEditorPaneProps as e, EditorProvider as f, type EditorProviderProps as g, type EditorTokenRefreshResult as h, type EditorUser as i, useEditorContext as u };
124
+ export { type Collaborator as C, type DocumentEditorBackend as D, type EditorContextValue as E, type ConnectionState as a, type DocumentEditorMode as b, DocumentEditorPane as c, type DocumentEditorPaneCollaborationConfig as d, type DocumentEditorPaneProps as e, EditorProvider as f, type EditorProviderProps as g, type EditorUser as h, type EditorTokenRefreshResult as i, useEditorContext as u };
package/dist/editor.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { C as Collaborator, a as ConnectionState } from './document-editor-pane-Xnl8SmA7.js';
2
- export { D as DocumentEditorBackend, b as DocumentEditorMode, c as DocumentEditorPane, d as DocumentEditorPaneCollaborationConfig, e as DocumentEditorPaneProps, E as EditorContextValue, f as EditorProvider, g as EditorProviderProps, h as EditorTokenRefreshResult, i as EditorUser, u as useEditorContext } from './document-editor-pane-Xnl8SmA7.js';
1
+ import { C as Collaborator, a as ConnectionState } from './document-editor-pane-A70-EhdQ.js';
2
+ export { D as DocumentEditorBackend, b as DocumentEditorMode, c as DocumentEditorPane, d as DocumentEditorPaneCollaborationConfig, e as DocumentEditorPaneProps, E as EditorContextValue, f as EditorProvider, g as EditorProviderProps, i as EditorTokenRefreshResult, h as EditorUser, u as useEditorContext } from './document-editor-pane-A70-EhdQ.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import { Editor } from '@tiptap/react';
5
5
  import { HocuspocusProvider } from '@hocuspocus/provider';
package/dist/editor.js CHANGED
@@ -11,7 +11,7 @@ import {
11
11
  useEditorConnection,
12
12
  useEditorContext,
13
13
  useYjsState
14
- } from "./chunk-4HT5J6CE.js";
14
+ } from "./chunk-HXEA7L2T.js";
15
15
  import "./chunk-Q56BYXQF.js";
16
16
  import "./chunk-W4LM3QYZ.js";
17
17
  import "./chunk-LTFK464G.js";
package/dist/files.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as FileTabData } from './file-tabs-BLfxfmAH.js';
2
2
  export { F as FileNode, b as FileTabs, c as FileTabsProps, d as FileTree, e as FileTreeProps, f as FileTreeVisibilityOptions, g as filterFileTree } from './file-tabs-BLfxfmAH.js';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { b as DocumentEditorMode, D as DocumentEditorBackend, d as DocumentEditorPaneCollaborationConfig } from './document-editor-pane-Xnl8SmA7.js';
4
+ import { b as DocumentEditorMode, D as DocumentEditorBackend, d as DocumentEditorPaneCollaborationConfig } from './document-editor-pane-A70-EhdQ.js';
5
5
  import { A as ArtifactPaneProps } from './artifact-pane-Bh45Ssco.js';
6
6
  import 'react';
7
7
  import '@hocuspocus/provider';
package/dist/files.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  FileTabs,
5
5
  FileTree,
6
6
  filterFileTree
7
- } from "./chunk-IAIJUFM6.js";
7
+ } from "./chunk-HYLTXGOI.js";
8
8
  import "./chunk-W4LM3QYZ.js";
9
9
  import "./chunk-LTFK464G.js";
10
10
  import "./chunk-RQHJBTEU.js";
@@ -2,29 +2,123 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import './usage-chart-CY9xo3KX.js';
4
4
 
5
- interface SidebarNavItem {
6
- id: string;
5
+ interface SidebarUser {
6
+ email: string;
7
+ name?: string;
8
+ tier?: string;
9
+ avatarUrl?: string;
10
+ }
11
+ interface SidebarProps {
12
+ children: React.ReactNode;
13
+ className?: string;
14
+ }
15
+ declare function Sidebar({ children, className }: SidebarProps): react_jsx_runtime.JSX.Element;
16
+ interface SidebarRailProps {
17
+ children: React.ReactNode;
18
+ className?: string;
19
+ }
20
+ declare function SidebarRail({ children, className }: SidebarRailProps): react_jsx_runtime.JSX.Element;
21
+ interface SidebarRailHeaderProps {
22
+ children: React.ReactNode;
23
+ className?: string;
24
+ }
25
+ declare function SidebarRailHeader({ children, className }: SidebarRailHeaderProps): react_jsx_runtime.JSX.Element;
26
+ interface SidebarRailNavProps {
27
+ children: React.ReactNode;
28
+ className?: string;
29
+ }
30
+ declare function SidebarRailNav({ children, className }: SidebarRailNavProps): react_jsx_runtime.JSX.Element;
31
+ interface SidebarRailFooterProps {
32
+ children: React.ReactNode;
33
+ className?: string;
34
+ }
35
+ declare function SidebarRailFooter({ children, className }: SidebarRailFooterProps): react_jsx_runtime.JSX.Element;
36
+ interface RailSeparatorProps {
37
+ className?: string;
38
+ }
39
+ declare function RailSeparator({ className }: RailSeparatorProps): react_jsx_runtime.JSX.Element;
40
+ interface RailButtonProps {
41
+ icon: React.ComponentType<{
42
+ className?: string;
43
+ }>;
7
44
  label: string;
8
- href: string;
9
- icon: string;
10
- badge?: string;
45
+ isActive?: boolean;
46
+ badge?: number;
47
+ onClick?: () => void;
48
+ className?: string;
11
49
  }
12
- interface SidebarSandbox {
13
- id: string;
14
- name: string;
15
- label?: string;
50
+ declare function RailButton({ icon: Icon, label, isActive, badge, onClick, className }: RailButtonProps): react_jsx_runtime.JSX.Element;
51
+ interface RailModeButtonProps {
52
+ mode: string;
53
+ icon: React.ComponentType<{
54
+ className?: string;
55
+ }>;
56
+ label: string;
57
+ badge?: number;
58
+ className?: string;
16
59
  }
17
- interface AppSidebarProps {
18
- navItems: SidebarNavItem[];
19
- activeNavId?: string;
20
- sandboxes?: SidebarSandbox[];
21
- activeSandboxId?: string;
22
- onSandboxChange?: (id: string) => void;
23
- onNewAgent?: () => void;
60
+ declare function RailModeButton({ mode, icon, label, badge, className }: RailModeButtonProps): react_jsx_runtime.JSX.Element;
61
+ interface SidebarPanelProps {
62
+ children: React.ReactNode;
63
+ className?: string;
64
+ }
65
+ declare function SidebarPanel({ children, className }: SidebarPanelProps): react_jsx_runtime.JSX.Element;
66
+ interface SidebarPanelHeaderProps {
67
+ children?: React.ReactNode;
68
+ title?: string;
69
+ className?: string;
70
+ }
71
+ declare function SidebarPanelHeader({ children, title, className }: SidebarPanelHeaderProps): react_jsx_runtime.JSX.Element;
72
+ interface SidebarPanelContentProps {
73
+ children: React.ReactNode;
74
+ className?: string;
75
+ }
76
+ declare function SidebarPanelContent({ children, className }: SidebarPanelContentProps): react_jsx_runtime.JSX.Element;
77
+ interface SidebarContentProps {
78
+ children: React.ReactNode;
79
+ className?: string;
80
+ }
81
+ declare function SidebarContent({ children, className }: SidebarContentProps): react_jsx_runtime.JSX.Element;
82
+ interface ProfileAvatarProps {
83
+ user?: SidebarUser | null;
84
+ isLoading?: boolean;
85
+ onLogout?: () => void;
86
+ onSettingsClick?: () => void;
87
+ settingsHref?: string;
88
+ /** Extra dropdown items rendered before settings/logout */
89
+ children?: React.ReactNode;
24
90
  className?: string;
25
91
  LinkComponent?: React.ComponentType<any>;
26
92
  }
27
- declare function AppSidebar({ navItems, activeNavId, sandboxes, activeSandboxId, onSandboxChange, onNewAgent, className, LinkComponent, }: AppSidebarProps): react_jsx_runtime.JSX.Element;
93
+ declare function ProfileAvatar({ user, isLoading, onLogout, onSettingsClick, settingsHref, children, className, LinkComponent, }: ProfileAvatarProps): react_jsx_runtime.JSX.Element;
94
+
95
+ /** Width constants (px) matching blueprint-agent layout */
96
+ declare const SIDEBAR_RAIL_WIDTH = 64;
97
+ declare const SIDEBAR_PANEL_WIDTH = 260;
98
+ declare const SIDEBAR_TOTAL_WIDTH: number;
99
+ interface SidebarContextValue {
100
+ /** Whether the content panel beside the rail is open */
101
+ panelOpen: boolean;
102
+ setPanelOpen: (open: boolean) => void;
103
+ togglePanel: () => void;
104
+ /** Current panel mode (app-defined, e.g. "projects", "batches") */
105
+ mode: string;
106
+ setMode: (mode: string) => void;
107
+ /** Switch mode — opens panel if closed, closes if same mode clicked */
108
+ switchMode: (mode: string) => void;
109
+ /** Whether entire sidebar (rail + panel) is hidden (focus mode) */
110
+ hidden: boolean;
111
+ setHidden: (hidden: boolean) => void;
112
+ /** Computed content margin in px */
113
+ contentMargin: number;
114
+ }
115
+ interface SidebarProviderProps {
116
+ defaultPanelOpen?: boolean;
117
+ defaultMode?: string;
118
+ children: React.ReactNode;
119
+ }
120
+ declare function SidebarProvider({ defaultPanelOpen, defaultMode, children, }: SidebarProviderProps): react_jsx_runtime.JSX.Element;
121
+ declare function useSidebar(): SidebarContextValue;
28
122
 
29
123
  interface ClusterStatusItem {
30
124
  icon: string;
@@ -88,12 +182,11 @@ type ProductVariant = "sandbox";
88
182
  interface NavItem {
89
183
  id: string;
90
184
  label: string;
91
- href: string;
185
+ href?: string;
92
186
  icon: React.ComponentType<{
93
187
  className?: string;
94
188
  }>;
95
- /** Material icon name for Stitch sidebar (optional, falls back to icon component) */
96
- materialIcon?: string;
189
+ badge?: number;
97
190
  }
98
191
  interface DashboardUser {
99
192
  email: string;
@@ -105,10 +198,20 @@ interface TopNavLink {
105
198
  label: string;
106
199
  href: string;
107
200
  }
201
+ interface PanelConfig {
202
+ mode: string;
203
+ title: string;
204
+ content: React.ReactNode;
205
+ }
108
206
  interface DashboardLayoutProps {
109
207
  children: React.ReactNode;
110
208
  variant?: ProductVariant;
209
+ /** Navigation items for the rail */
111
210
  navItems: NavItem[];
211
+ /** Nav item IDs that act as panel mode switchers (others are direct links) */
212
+ modeItems?: string[];
213
+ /** Panel content per mode */
214
+ panels?: PanelConfig[];
112
215
  activeNavId?: string;
113
216
  user?: DashboardUser | null;
114
217
  isLoading?: boolean;
@@ -121,14 +224,16 @@ interface DashboardLayoutProps {
121
224
  contentClassName?: string;
122
225
  topNavLinks?: TopNavLink[];
123
226
  activeTopNavHref?: string;
124
- sandboxName?: string;
125
- sandboxLabel?: string;
126
- /** Custom link component (e.g., Next.js Link). Use any type to support various router implementations. */
127
227
  LinkComponent?: React.ComponentType<any>;
128
- /** Footer content rendered at bottom of viewport */
129
228
  footer?: React.ReactNode;
229
+ defaultPanelOpen?: boolean;
230
+ defaultMode?: string;
231
+ /** Extra content in the rail footer (above profile avatar) */
232
+ railFooter?: React.ReactNode;
233
+ /** Extra dropdown items in the profile menu */
234
+ profileMenuItems?: React.ReactNode;
130
235
  }
131
- 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;
236
+ declare function DashboardLayout({ defaultPanelOpen, defaultMode, ...props }: DashboardLayoutProps): react_jsx_runtime.JSX.Element;
132
237
 
133
238
  interface ResourceMeterProps {
134
239
  label: string;
@@ -261,4 +366,4 @@ interface VariantListProps {
261
366
  }
262
367
  declare function VariantList({ variants, selectedId, onSelect, onAccept, onReject, isActioning, className, }: VariantListProps): react_jsx_runtime.JSX.Element;
263
368
 
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 };
369
+ export { type SidebarPanelProps as $, type RailSeparatorProps as A, type Backend as B, ClusterStatusBar as C, DashboardLayout as D, ResourceMeter as E, type ResourceMeterProps as F, SIDEBAR_RAIL_WIDTH as G, SIDEBAR_TOTAL_WIDTH as H, type Invoice as I, SandboxCard as J, type SandboxCardData as K, type SandboxCardProps as L, type SandboxStatus as M, type NavItem as N, SandboxTable as O, type PanelConfig as P, type SandboxTableProps as Q, RailButton as R, SIDEBAR_PANEL_WIDTH as S, Sidebar as T, SidebarContent as U, type SidebarContentProps as V, SidebarPanel as W, SidebarPanelContent as X, type SidebarPanelContentProps as Y, SidebarPanelHeader as Z, type SidebarPanelHeaderProps as _, BackendSelector as a, type SidebarProps as a0, SidebarProvider as a1, type SidebarProviderProps as a2, SidebarRail as a3, SidebarRailFooter as a4, type SidebarRailFooterProps as a5, SidebarRailHeader as a6, type SidebarRailHeaderProps as a7, SidebarRailNav as a8, type SidebarRailNavProps as a9, type SidebarRailProps as aa, type SidebarUser as ab, type TopNavLink as ac, VariantList as ad, type VariantListProps as ae, useSidebar as af, type Profile as ag, type PlanFeature as ah, type Variant as ai, type VariantOutcome as aj, type VariantStatus as ak, type BackendSelectorProps as b, type ClusterStatusBarProps as c, type ClusterStatusItem as d, CreditBalance as e, type CreditBalanceProps as f, type DashboardLayoutProps as g, type DashboardUser as h, InvoiceTable as i, type InvoiceTableProps as j, NewSandboxCard as k, type NewSandboxCardProps as l, type PlanCardData as m, PlanCards as n, type PlanCardsProps as o, type ProductVariant as p, ProfileAvatar as q, type ProfileAvatarProps as r, ProfileComparison as s, type ProfileComparisonProps as t, ProfileSelector as u, type ProfileSelectorProps as v, type RailButtonProps as w, RailModeButton as x, type RailModeButtonProps as y, RailSeparator as z };
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, 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 { 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';
3
3
  import * as react_jsx_runtime from 'react/jsx-runtime';
4
4
  import * as React from 'react';
5
5
  import React__default from 'react';
@@ -7,14 +7,16 @@ export { AgentWorkbench, AuditCheck, AuditResults, AuditResultsProps, BannerType
7
7
  export { a as ArtifactPane, A as ArtifactPaneProps } from './artifact-pane-Bh45Ssco.js';
8
8
  export { OpenUIAction, OpenUIActionsNode, OpenUIArtifactRenderer, OpenUIArtifactRendererProps, OpenUIBadgeNode, OpenUICardNode, OpenUICodeNode, OpenUIComponentNode, OpenUIGridNode, OpenUIHeadingNode, OpenUIKeyValueNode, OpenUIMarkdownNode, OpenUIPrimitive, OpenUISeparatorNode, OpenUIStackNode, OpenUIStatNode, OpenUITableNode, OpenUITextNode } from './openui.js';
9
9
  export { AgentTimeline, AgentTimelineArtifactItem, AgentTimelineCustomItem, AgentTimelineItem, AgentTimelineMessageItem, AgentTimelineProps, AgentTimelineStatusItem, AgentTimelineTone, AgentTimelineToolGroupItem, AgentTimelineToolItem, ChatMessage, ChatMessageProps, MessageList, MessageListProps, MessageRole, ThinkingIndicator, ThinkingIndicatorProps, UserMessage, UserMessageProps } from './chat.js';
10
- export { C as ChatContainer, a as ChatContainerProps, b as ChatInput, c as ChatInputProps, P as PendingFile } from './chat-container-Dn1jWtWo.js';
10
+ export { C as ChatContainer, a as ChatContainerProps, b as ChatInput, c as ChatInputProps, P as PendingFile } from './chat-container-Cg-GwyiK.js';
11
+ export { C as Collaborator, a as ConnectionState, D as DocumentEditorBackend, b as DocumentEditorMode, c as DocumentEditorPane, d as DocumentEditorPaneCollaborationConfig, e as DocumentEditorPaneProps, E as EditorContextValue, f as EditorProvider, g as EditorProviderProps, h as EditorUser, u as useEditorContext } from './document-editor-pane-A70-EhdQ.js';
12
+ export { CollaboratorsList, EditorToolbar, TiptapEditor, TiptapEditorProps, useAwareness, useCollaboratorPresence, useCollaborators, useDocumentChanges, useEditorConnection, useYjsState } from './editor.js';
11
13
  export { F as FeedSegment, T as ToolCallData, a as ToolCallFeed, b as ToolCallFeedProps, c as ToolCallGroup, d as ToolCallGroupProps, e as ToolCallStatus, f as ToolCallStep, g as ToolCallStepProps, h as ToolCallType, p as parseToolEvent } from './tool-call-feed-D5Ume-Pt.js';
12
14
  export { E as ExpandedToolDetail, I as InlineThinkingItem, c as InlineToolItem, R as RunGroup, e as RunGroupProps } from './expanded-tool-detail-DM5M_T9h.js';
13
15
  import { b as ToolPart } from './parts-CyGkM6Fp.js';
14
16
  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
17
  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';
16
18
  export { FileArtifactPane, FileArtifactPaneProps, FilePreview, FilePreviewProps } from './files.js';
17
- 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';
19
+ 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 './index-tTfThG0n.js';
18
20
  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';
19
21
  export { AuthHeader, GitHubLoginButton, LoginLayout, LoginLayoutProps, UserMenu } from './auth.js';
20
22
  export { CodeBlock, CopyButton, Markdown, MarkdownProps } from './markdown.js';
@@ -35,9 +37,9 @@ import '@radix-ui/react-tabs';
35
37
  import '@radix-ui/react-progress';
36
38
  import '@radix-ui/react-switch';
37
39
  import '@radix-ui/react-label';
38
- import './document-editor-pane-Xnl8SmA7.js';
39
40
  import '@hocuspocus/provider';
40
41
  import 'yjs';
42
+ import '@tiptap/react';
41
43
  import 'nanostores';
42
44
  import 'clsx';
43
45