@tangle-network/sandbox-ui 0.8.4 → 0.9.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.
- package/README.md +5 -6
- package/dist/auth.js +2 -2
- package/dist/chat.js +3 -3
- package/dist/{chunk-XXDFEF72.js → chunk-7YWFOGKQ.js} +51 -50
- package/dist/{chunk-VOUV7GGB.js → chunk-DI3NZ5ZX.js} +8 -22
- package/dist/{chunk-BUOQTBTO.js → chunk-JLKYXLFN.js} +1 -1
- package/dist/{chunk-2QZ6G7NM.js → chunk-MKTSMWVD.js} +5 -5
- package/dist/{chunk-UXQMIR3D.js → chunk-OHPW55EV.js} +1 -1
- package/dist/{chunk-WXK43R62.js → chunk-PLTZB5BC.js} +1 -1
- package/dist/{chunk-HFMAXUHV.js → chunk-QC4BJEG6.js} +2 -2
- package/dist/{chunk-3CJ2SOEI.js → chunk-US6JKJKH.js} +2 -2
- package/dist/{chunk-7U2Z23NE.js → chunk-VX3XOUEB.js} +15 -1
- package/dist/dashboard.d.ts +23 -3
- package/dist/dashboard.js +41 -4
- package/dist/globals.css +520 -1038
- package/dist/index.d.ts +1 -1
- package/dist/index.js +8 -8
- package/dist/openui.js +2 -2
- package/dist/pages.d.ts +70 -5
- package/dist/pages.js +1194 -135
- package/dist/primitives.js +2 -2
- package/dist/styles.css +520 -1038
- package/dist/tokens.css +248 -857
- package/dist/{variant-list-C8wx2TqF.d.ts → variant-list-CsS6ydgm.d.ts} +1 -1
- package/dist/workspace.d.ts +1 -1
- package/dist/workspace.js +4 -4
- package/package.json +16 -3
package/README.md
CHANGED
|
@@ -133,16 +133,15 @@ There is a built-in Tangle default theme, but consumers can restyle the library
|
|
|
133
133
|
|
|
134
134
|
`WorkspaceLayout` and `SandboxWorkbench` support:
|
|
135
135
|
|
|
136
|
-
- `theme="
|
|
137
|
-
-
|
|
138
|
-
- `theme="consumer"`
|
|
136
|
+
- `theme="vault"` — light theme with solid surfaces
|
|
137
|
+
- No theme prop — default dark theme
|
|
139
138
|
|
|
140
139
|
They also support `density="comfortable"` and `density="compact"`.
|
|
141
140
|
|
|
142
141
|
```tsx
|
|
143
142
|
<SandboxWorkbench
|
|
144
143
|
layout={{
|
|
145
|
-
theme: "
|
|
144
|
+
theme: "vault",
|
|
146
145
|
density: "comfortable",
|
|
147
146
|
}}
|
|
148
147
|
session={{ ... }}
|
|
@@ -152,7 +151,7 @@ They also support `density="comfortable"` and `density="compact"`.
|
|
|
152
151
|
If you are not using `SandboxWorkbench`, you can set the same attributes yourself:
|
|
153
152
|
|
|
154
153
|
```tsx
|
|
155
|
-
<div data-sandbox-ui data-sandbox-theme="
|
|
154
|
+
<div data-sandbox-ui data-sandbox-theme="vault" data-density="compact">
|
|
156
155
|
<YourSandboxApp />
|
|
157
156
|
</div>
|
|
158
157
|
```
|
|
@@ -257,7 +256,7 @@ Retheming is absolutely supported, but the documentation was thinner than it sho
|
|
|
257
256
|
- [Tailwind CSS](https://tailwindcss.com/) v4
|
|
258
257
|
- [Lucide](https://lucide.dev/) icons
|
|
259
258
|
- [CVA](https://cva.style/) for variant management
|
|
260
|
-
- Shared semantic tokens for
|
|
259
|
+
- Shared semantic tokens for default dark and `vault` light sandbox themes
|
|
261
260
|
- ESM-only, tree-shakeable, fully typed
|
|
262
261
|
|
|
263
262
|
## License
|
package/dist/auth.js
CHANGED
|
@@ -3,9 +3,9 @@ import {
|
|
|
3
3
|
GitHubLoginButton,
|
|
4
4
|
LoginLayout,
|
|
5
5
|
UserMenu
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DI3NZ5ZX.js";
|
|
7
7
|
import "./chunk-34A66VBG.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-MKTSMWVD.js";
|
|
9
9
|
import "./chunk-RQHJBTEU.js";
|
|
10
10
|
export {
|
|
11
11
|
AuthHeader,
|
package/dist/chat.js
CHANGED
|
@@ -8,17 +8,17 @@ import {
|
|
|
8
8
|
MessageList,
|
|
9
9
|
ThinkingIndicator,
|
|
10
10
|
UserMessage
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-JLKYXLFN.js";
|
|
12
12
|
import "./chunk-54SQQMMM.js";
|
|
13
13
|
import "./chunk-EXSOPXIY.js";
|
|
14
14
|
import "./chunk-HRMUF35V.js";
|
|
15
15
|
import "./chunk-MT5FJ3ZT.js";
|
|
16
16
|
import "./chunk-BX6AQMUS.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-PLTZB5BC.js";
|
|
18
18
|
import "./chunk-34I7UFSX.js";
|
|
19
19
|
import "./chunk-T7HMZEVO.js";
|
|
20
20
|
import "./chunk-ZMNSRDMH.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-MKTSMWVD.js";
|
|
22
22
|
import "./chunk-RQHJBTEU.js";
|
|
23
23
|
export {
|
|
24
24
|
AgentTimeline,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-ZMNSRDMH.js";
|
|
21
21
|
import {
|
|
22
22
|
Button
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MKTSMWVD.js";
|
|
24
24
|
import {
|
|
25
25
|
cn
|
|
26
26
|
} from "./chunk-RQHJBTEU.js";
|
|
@@ -157,7 +157,7 @@ function Sidebar({ children, className, style }) {
|
|
|
157
157
|
{
|
|
158
158
|
"data-sidebar": "true",
|
|
159
159
|
className: cn(
|
|
160
|
-
"fixed inset-y-0 left-0 z-40 flex bg-card
|
|
160
|
+
"fixed inset-y-0 left-0 z-40 flex bg-card border-r border-border transition-[transform,width] duration-200 ease-in-out",
|
|
161
161
|
hidden && "-translate-x-full",
|
|
162
162
|
className
|
|
163
163
|
),
|
|
@@ -193,7 +193,7 @@ function RailButton({ icon: Icon2, label, isActive, badge, onClick, className })
|
|
|
193
193
|
"hover:bg-[var(--accent-surface-soft)] hover:text-[var(--accent-text)]",
|
|
194
194
|
"active:scale-95",
|
|
195
195
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary",
|
|
196
|
-
isActive && "bg-[var(--accent-surface-strong)] text-[var(--accent-text)]
|
|
196
|
+
isActive && "bg-[var(--accent-surface-strong)] text-[var(--accent-text)]",
|
|
197
197
|
!isActive && "text-muted-foreground",
|
|
198
198
|
className
|
|
199
199
|
),
|
|
@@ -224,7 +224,7 @@ function SidebarPanel({ children, className }) {
|
|
|
224
224
|
"div",
|
|
225
225
|
{
|
|
226
226
|
className: cn(
|
|
227
|
-
"transition-[opacity] duration-150 h-full overflow-hidden border-l border-border bg-card
|
|
227
|
+
"transition-[opacity] duration-150 h-full overflow-hidden border-l border-border bg-card",
|
|
228
228
|
panelOpen ? "w-[260px] opacity-100" : "w-0 opacity-0 pointer-events-none",
|
|
229
229
|
className
|
|
230
230
|
),
|
|
@@ -319,7 +319,7 @@ function ProfileAvatar({
|
|
|
319
319
|
import { Fragment as Fragment2, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
320
320
|
function ClusterStatusBar({ items, latency, className }) {
|
|
321
321
|
if (!items?.length) return null;
|
|
322
|
-
return /* @__PURE__ */ jsx3("div", { className: cn("fixed bottom-6 left-1/2 -translate-x-1/2 z-40 w-max max-w-[90vw] animate-in slide-in-from-bottom flex justify-center", className), children: /* @__PURE__ */ jsxs2("div", { className: "
|
|
322
|
+
return /* @__PURE__ */ jsx3("div", { className: cn("fixed bottom-6 left-1/2 -translate-x-1/2 z-40 w-max max-w-[90vw] animate-in slide-in-from-bottom flex justify-center", className), children: /* @__PURE__ */ jsxs2("div", { className: "overflow-hidden rounded-full border border-border bg-card px-6 py-3 flex flex-wrap sm:flex-nowrap items-center justify-between gap-8 shadow-sm", children: [
|
|
323
323
|
/* @__PURE__ */ jsx3("div", { className: "flex items-center gap-6", children: items.map((item, i) => /* @__PURE__ */ jsxs2("div", { className: "flex items-center gap-2", children: [
|
|
324
324
|
/* @__PURE__ */ jsx3("span", { className: "text-[var(--md3-primary)] [&_svg]:h-[18px] [&_svg]:w-[18px]", children: item.icon }),
|
|
325
325
|
/* @__PURE__ */ jsxs2("div", { className: "flex flex-col", children: [
|
|
@@ -608,7 +608,7 @@ function DashboardLayoutInner({
|
|
|
608
608
|
/* @__PURE__ */ jsxs6(
|
|
609
609
|
"nav",
|
|
610
610
|
{
|
|
611
|
-
className: "fixed top-0 z-50 bg-card
|
|
611
|
+
className: "fixed top-0 z-50 bg-card border-b border-border flex justify-between items-center px-8 h-14 font-sans text-[13px] tracking-tight transition-[left,width] duration-200 ease-in-out",
|
|
612
612
|
style: {
|
|
613
613
|
left: hidden ? 0 : contentMargin,
|
|
614
614
|
width: hidden ? "100%" : `calc(100% - ${contentMargin}px)`
|
|
@@ -633,7 +633,7 @@ function DashboardLayoutInner({
|
|
|
633
633
|
{
|
|
634
634
|
type: "button",
|
|
635
635
|
onClick: onNewSandbox,
|
|
636
|
-
className: "hidden md:flex items-center gap-2 bg-[var(--
|
|
636
|
+
className: "hidden md:flex items-center gap-2 bg-[var(--btn-primary-bg)] border border-[var(--border-accent)] text-[var(--btn-primary-text)] px-4 py-2 rounded-lg font-bold hover:bg-[var(--btn-primary-hover)] transition-all active:scale-95 text-xs",
|
|
637
637
|
children: [
|
|
638
638
|
/* @__PURE__ */ jsx7(Plus, { className: "h-3.5 w-3.5" }),
|
|
639
639
|
"New Sandbox"
|
|
@@ -669,8 +669,8 @@ function DashboardLayoutInner({
|
|
|
669
669
|
}
|
|
670
670
|
),
|
|
671
671
|
/* @__PURE__ */ jsx7(Sidebar, { className: cn("hidden lg:flex", sidebarClassName), children: sidebarContent }),
|
|
672
|
-
/* @__PURE__ */ jsx7(SidebarContent, { className: cn("pt-16 px-
|
|
673
|
-
/* @__PURE__ */ jsx7("main", { className: cn("pt-16 px-6 pb-8 min-h-screen lg:hidden", contentClassName), children }),
|
|
672
|
+
/* @__PURE__ */ jsx7(SidebarContent, { className: cn("pt-16 px-8 pb-8 hidden lg:block bg-background", contentClassName), children }),
|
|
673
|
+
/* @__PURE__ */ jsx7("main", { className: cn("pt-16 px-6 pb-8 min-h-screen lg:hidden bg-background", contentClassName), children }),
|
|
674
674
|
footer
|
|
675
675
|
] });
|
|
676
676
|
}
|
|
@@ -740,33 +740,33 @@ function SandboxCard({
|
|
|
740
740
|
const isTransitioning = sandbox.status === "provisioning" || sandbox.status === "creating";
|
|
741
741
|
const isStopped = !isRunning && !isTransitioning;
|
|
742
742
|
return /* @__PURE__ */ jsxs8("div", { className: cn(
|
|
743
|
-
"group relative
|
|
744
|
-
isRunning ? "border-[var(--
|
|
743
|
+
"group relative flex flex-col justify-between overflow-hidden rounded-lg border bg-card p-5 transition-colors",
|
|
744
|
+
isRunning ? "border-[var(--status-running)]/30" : "border-border",
|
|
745
|
+
"hover:border-foreground/15",
|
|
745
746
|
className
|
|
746
747
|
), children: [
|
|
747
|
-
|
|
748
|
-
/* @__PURE__ */ jsxs8("div", { className: "relative z-10 flex items-start justify-between", children: [
|
|
748
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-start justify-between", children: [
|
|
749
749
|
/* @__PURE__ */ jsxs8("div", { children: [
|
|
750
|
-
/* @__PURE__ */ jsxs8("h3", { className: "flex items-center gap-2
|
|
750
|
+
/* @__PURE__ */ jsxs8("h3", { className: "flex items-center gap-2 text-sm font-bold text-foreground", children: [
|
|
751
751
|
sandbox.name,
|
|
752
|
-
isRunning && /* @__PURE__ */ jsxs8("span", { className: "relative flex h-2
|
|
753
|
-
/* @__PURE__ */ jsx9("span", { className: "absolute inline-flex h-full w-full animate-
|
|
754
|
-
/* @__PURE__ */ jsx9("span", { className: "relative inline-flex h-
|
|
752
|
+
isRunning && /* @__PURE__ */ jsxs8("span", { className: "relative flex h-2 w-2", children: [
|
|
753
|
+
/* @__PURE__ */ jsx9("span", { className: "absolute inline-flex h-full w-full animate-pulse rounded-full bg-[var(--status-running)] opacity-75" }),
|
|
754
|
+
/* @__PURE__ */ jsx9("span", { className: "relative inline-flex h-1.5 w-1.5 rounded-full bg-[var(--status-running)]" })
|
|
755
755
|
] })
|
|
756
756
|
] }),
|
|
757
|
-
/* @__PURE__ */ jsx9("p", { className: "font-mono text-[10px] tracking-wider text-
|
|
757
|
+
/* @__PURE__ */ jsx9("p", { className: "mt-0.5 font-mono text-[10px] tracking-wider text-muted-foreground uppercase", children: sandbox.nodeId || "Unknown Node" })
|
|
758
758
|
] }),
|
|
759
|
-
/* @__PURE__ */
|
|
759
|
+
/* @__PURE__ */ jsxs8(DropdownMenu, { children: [
|
|
760
760
|
/* @__PURE__ */ jsx9(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx9(
|
|
761
761
|
"button",
|
|
762
762
|
{
|
|
763
763
|
type: "button",
|
|
764
|
-
className: "rounded-
|
|
764
|
+
className: "rounded-md p-1.5 text-muted-foreground transition-colors hover:bg-muted hover:text-foreground outline-none",
|
|
765
765
|
"aria-label": "Sandbox options",
|
|
766
|
-
children: /* @__PURE__ */ jsx9(MoreVertical, { className: "h-
|
|
766
|
+
children: /* @__PURE__ */ jsx9(MoreVertical, { className: "h-4 w-4" })
|
|
767
767
|
}
|
|
768
768
|
) }),
|
|
769
|
-
/* @__PURE__ */ jsxs8(DropdownMenuContent, { align: "end", className: "
|
|
769
|
+
/* @__PURE__ */ jsxs8(DropdownMenuContent, { align: "end", className: "min-w-[180px]", children: [
|
|
770
770
|
isRunning && /* @__PURE__ */ jsxs8(Fragment5, { children: [
|
|
771
771
|
onStop && /* @__PURE__ */ jsxs8(DropdownMenuItem, { onClick: () => onStop(sandbox.id), children: [
|
|
772
772
|
/* @__PURE__ */ jsx9(PowerOff, { className: "mr-2 h-4 w-4" }),
|
|
@@ -776,7 +776,7 @@ function SandboxCard({
|
|
|
776
776
|
/* @__PURE__ */ jsx9(Clock, { className: "mr-2 h-4 w-4" }),
|
|
777
777
|
" Keep Alive"
|
|
778
778
|
] }),
|
|
779
|
-
/* @__PURE__ */ jsx9(DropdownMenuSeparator, {
|
|
779
|
+
(onStop || onKeepAlive) && /* @__PURE__ */ jsx9(DropdownMenuSeparator, {}),
|
|
780
780
|
onUsage && /* @__PURE__ */ jsxs8(DropdownMenuItem, { onClick: () => onUsage(sandbox.id), children: [
|
|
781
781
|
/* @__PURE__ */ jsx9(BarChart2, { className: "mr-2 h-4 w-4" }),
|
|
782
782
|
" View Usage"
|
|
@@ -785,12 +785,14 @@ function SandboxCard({
|
|
|
785
785
|
/* @__PURE__ */ jsx9(Activity, { className: "mr-2 h-4 w-4" }),
|
|
786
786
|
" Health Check"
|
|
787
787
|
] }),
|
|
788
|
-
/* @__PURE__ */ jsx9(DropdownMenuSeparator, {
|
|
789
|
-
onFork && /* @__PURE__ */ jsxs8(
|
|
790
|
-
/* @__PURE__ */
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
788
|
+
(onUsage || onHealth) && /* @__PURE__ */ jsx9(DropdownMenuSeparator, {}),
|
|
789
|
+
onFork && /* @__PURE__ */ jsxs8(Fragment5, { children: [
|
|
790
|
+
/* @__PURE__ */ jsxs8(DropdownMenuItem, { onClick: () => onFork(sandbox.id), children: [
|
|
791
|
+
/* @__PURE__ */ jsx9(Copy, { className: "mr-2 h-4 w-4" }),
|
|
792
|
+
" Fork Sandbox"
|
|
793
|
+
] }),
|
|
794
|
+
/* @__PURE__ */ jsx9(DropdownMenuSeparator, {})
|
|
795
|
+
] })
|
|
794
796
|
] }),
|
|
795
797
|
isStopped && /* @__PURE__ */ jsxs8(Fragment5, { children: [
|
|
796
798
|
onResume && /* @__PURE__ */ jsxs8(DropdownMenuItem, { onClick: () => onResume(sandbox.id), children: [
|
|
@@ -801,46 +803,46 @@ function SandboxCard({
|
|
|
801
803
|
/* @__PURE__ */ jsx9(Copy, { className: "mr-2 h-4 w-4" }),
|
|
802
804
|
" Fork Sandbox"
|
|
803
805
|
] }),
|
|
804
|
-
/* @__PURE__ */ jsx9(DropdownMenuSeparator, {
|
|
806
|
+
(onResume || onFork) && /* @__PURE__ */ jsx9(DropdownMenuSeparator, {})
|
|
805
807
|
] }),
|
|
806
|
-
onDelete && /* @__PURE__ */ jsxs8(DropdownMenuItem, { className: "text-
|
|
808
|
+
onDelete && /* @__PURE__ */ jsxs8(DropdownMenuItem, { className: "text-destructive focus:bg-destructive/10 focus:text-destructive", onClick: () => onDelete(sandbox.id), children: [
|
|
807
809
|
/* @__PURE__ */ jsx9(Trash2, { className: "mr-2 h-4 w-4" }),
|
|
808
810
|
" Delete Sandbox"
|
|
809
811
|
] })
|
|
810
812
|
] })
|
|
811
|
-
] })
|
|
813
|
+
] })
|
|
812
814
|
] }),
|
|
813
|
-
/* @__PURE__ */ jsxs8("div", { className: "
|
|
814
|
-
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-3
|
|
815
|
-
/* @__PURE__ */ jsx9("div", { className: cn("flex h-
|
|
815
|
+
/* @__PURE__ */ jsxs8("div", { className: "my-4", children: [
|
|
816
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex items-center gap-3 rounded-md border border-border bg-muted/30 p-3", children: [
|
|
817
|
+
/* @__PURE__ */ jsx9("div", { className: cn("flex h-10 w-10 items-center justify-center rounded-md", isRunning ? "bg-[var(--surface-success-bg)]" : "bg-muted"), children: sandbox.imageIcon ? sandbox.imageIcon : sandbox.image?.includes("node") ? /* @__PURE__ */ jsx9(Code2, { className: cn("h-5 w-5", isRunning ? "text-[var(--surface-success-text)]" : "text-muted-foreground") }) : /* @__PURE__ */ jsx9(Terminal, { className: cn("h-5 w-5", isRunning ? "text-[var(--surface-success-text)]" : "text-muted-foreground") }) }),
|
|
816
818
|
/* @__PURE__ */ jsxs8("div", { className: "flex flex-col", children: [
|
|
817
|
-
/* @__PURE__ */ jsx9("span", { className: "text-[10px] text-
|
|
818
|
-
/* @__PURE__ */ jsx9("span", { className: "text-
|
|
819
|
+
/* @__PURE__ */ jsx9("span", { className: "text-[10px] text-muted-foreground uppercase tracking-widest font-bold", children: "Environment" }),
|
|
820
|
+
/* @__PURE__ */ jsx9("span", { className: "text-xs font-medium text-foreground font-mono mt-0.5", children: sandbox.image || "Universal" })
|
|
819
821
|
] })
|
|
820
822
|
] }),
|
|
821
|
-
isTransitioning && /* @__PURE__ */ jsxs8("div", { className: "mt-
|
|
822
|
-
/* @__PURE__ */ jsxs8("div", { className: "flex justify-between text-xs text-
|
|
823
|
+
isTransitioning && /* @__PURE__ */ jsxs8("div", { className: "mt-3", children: [
|
|
824
|
+
/* @__PURE__ */ jsxs8("div", { className: "flex justify-between text-xs text-muted-foreground font-medium mb-1", children: [
|
|
823
825
|
/* @__PURE__ */ jsx9("span", { children: sandbox.provisioningMessage || "Starting..." }),
|
|
824
826
|
/* @__PURE__ */ jsxs8("span", { children: [
|
|
825
827
|
sandbox.provisioningPercent || 0,
|
|
826
828
|
"%"
|
|
827
829
|
] })
|
|
828
830
|
] }),
|
|
829
|
-
/* @__PURE__ */ jsx9("div", { className: "h-1
|
|
831
|
+
/* @__PURE__ */ jsx9("div", { className: "h-1 w-full overflow-hidden rounded-full bg-muted", children: /* @__PURE__ */ jsx9(
|
|
830
832
|
"div",
|
|
831
833
|
{
|
|
832
|
-
className: "h-full bg-
|
|
834
|
+
className: "h-full bg-primary transition-all duration-500 rounded-full",
|
|
833
835
|
style: { width: `${sandbox.provisioningPercent || 5}%` }
|
|
834
836
|
}
|
|
835
837
|
) })
|
|
836
838
|
] })
|
|
837
839
|
] }),
|
|
838
|
-
/* @__PURE__ */ jsx9("div", { className: "
|
|
840
|
+
/* @__PURE__ */ jsx9("div", { className: "border-t border-border pt-3", children: isRunning ? /* @__PURE__ */ jsxs8(
|
|
839
841
|
"button",
|
|
840
842
|
{
|
|
841
843
|
type: "button",
|
|
842
844
|
onClick: () => onOpenIDE?.(sandbox.id),
|
|
843
|
-
className: "flex w-full items-center justify-center gap-2 rounded-
|
|
845
|
+
className: "flex w-full items-center justify-center gap-2 rounded-md bg-[var(--btn-primary-bg)] px-4 py-2 text-sm font-semibold text-[var(--btn-primary-text)] transition-colors hover:bg-[var(--btn-primary-hover)] active:scale-[0.97]",
|
|
844
846
|
children: [
|
|
845
847
|
/* @__PURE__ */ jsx9(Network, { className: "h-4 w-4" }),
|
|
846
848
|
"Connect Session"
|
|
@@ -853,8 +855,8 @@ function SandboxCard({
|
|
|
853
855
|
onClick: () => onWake?.(sandbox.id),
|
|
854
856
|
disabled: isTransitioning,
|
|
855
857
|
className: cn(
|
|
856
|
-
"flex
|
|
857
|
-
isTransitioning ? "bg-muted
|
|
858
|
+
"flex w-full items-center justify-center gap-2 rounded-md px-4 py-2 text-sm font-semibold transition-colors border",
|
|
859
|
+
isTransitioning ? "bg-muted text-muted-foreground cursor-not-allowed border-border" : "bg-card text-foreground hover:bg-muted border-border active:scale-[0.97]"
|
|
858
860
|
),
|
|
859
861
|
children: [
|
|
860
862
|
/* @__PURE__ */ jsx9(Play, { className: "h-4 w-4" }),
|
|
@@ -871,14 +873,13 @@ function NewSandboxCard({ onClick, className }) {
|
|
|
871
873
|
type: "button",
|
|
872
874
|
onClick,
|
|
873
875
|
className: cn(
|
|
874
|
-
"
|
|
876
|
+
"border-2 border-dashed border-border rounded-lg p-5 flex flex-col items-center justify-center text-center cursor-pointer hover:border-foreground/20 hover:bg-muted/30 transition-colors w-full min-h-[160px]",
|
|
875
877
|
className
|
|
876
878
|
),
|
|
877
879
|
children: [
|
|
878
|
-
/* @__PURE__ */ jsx9("div", { className: "
|
|
879
|
-
/* @__PURE__ */ jsx9("
|
|
880
|
-
/* @__PURE__ */ jsx9("span", { className: "mt-
|
|
881
|
-
/* @__PURE__ */ jsx9("span", { className: "mt-2 text-sm text-[var(--md3-primary)] font-medium", children: "Deploy a new isolated environment" })
|
|
880
|
+
/* @__PURE__ */ jsx9("div", { className: "flex h-12 w-12 items-center justify-center rounded-lg bg-muted text-muted-foreground", children: /* @__PURE__ */ jsx9(Plus2, { className: "h-6 w-6" }) }),
|
|
881
|
+
/* @__PURE__ */ jsx9("span", { className: "mt-4 text-sm font-semibold text-foreground", children: "New Sandbox" }),
|
|
882
|
+
/* @__PURE__ */ jsx9("span", { className: "mt-1 text-xs text-muted-foreground", children: "Deploy a new isolated environment" })
|
|
882
883
|
]
|
|
883
884
|
}
|
|
884
885
|
);
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
} from "./chunk-34A66VBG.js";
|
|
12
12
|
import {
|
|
13
13
|
Button
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MKTSMWVD.js";
|
|
15
15
|
import {
|
|
16
16
|
cn
|
|
17
17
|
} from "./chunk-RQHJBTEU.js";
|
|
@@ -174,28 +174,14 @@ function LoginLayout({
|
|
|
174
174
|
children,
|
|
175
175
|
className
|
|
176
176
|
}) {
|
|
177
|
-
return /* @__PURE__ */
|
|
178
|
-
/* @__PURE__ */ jsxs2("div", { className: "
|
|
179
|
-
/* @__PURE__ */ jsx2("div", { className: "
|
|
180
|
-
/* @__PURE__ */ jsx2("
|
|
181
|
-
/* @__PURE__ */ jsx2("
|
|
182
|
-
/* @__PURE__ */ jsx2("div", { className: "absolute inset-0 bg-[url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0ibTIwIDB2MjBIMFYweiIgZmlsbD0ibm9uZSIvPPHBhdGggZD0iTTE5LjUgMEwxOS41IDIwTTIwIC41TDAgLjVIMjAiIGZpbGw9Im5vbmUiIHN0cm9rZT0icmdiYSgyNTUsIDI1NSLCAyNTUsIDAuMDMpIiBzdHJva2Utd2lkdGg9IjEiLz48L3N2Zz4=')] opacity-30", style: { maskImage: "radial-gradient(circle at center, black, transparent)", WebkitMaskImage: "radial-gradient(circle at center, black 40%, transparent 100%)" } })
|
|
177
|
+
return /* @__PURE__ */ jsx2("div", { className: cn("relative flex min-h-screen items-center justify-center bg-background overflow-hidden antialiased font-sans flex-col", className), children: /* @__PURE__ */ jsxs2("div", { className: "z-10 w-full max-w-md px-6 animate-in flex flex-col items-center", children: [
|
|
178
|
+
/* @__PURE__ */ jsxs2("div", { className: "mb-10 text-center flex flex-col items-center", children: [
|
|
179
|
+
/* @__PURE__ */ jsx2("div", { className: "inline-flex h-14 w-14 mb-4 items-center justify-center rounded-lg bg-muted border border-border", children: brandIcon || /* @__PURE__ */ jsx2(Terminal, { className: "h-7 w-7 text-foreground" }) }),
|
|
180
|
+
/* @__PURE__ */ jsx2("h1", { className: "text-2xl font-bold tracking-tight text-foreground font-display", children: title }),
|
|
181
|
+
/* @__PURE__ */ jsx2("p", { className: "mt-2 text-sm text-muted-foreground", children: subtitle })
|
|
183
182
|
] }),
|
|
184
|
-
/* @__PURE__ */
|
|
185
|
-
|
|
186
|
-
/* @__PURE__ */ jsxs2("div", { className: "inline-flex h-16 w-16 mb-4 items-center justify-center rounded-2xl glass-panel shadow-[0_0_30px_rgba(173,163,255,0.15)] glow-primary relative", children: [
|
|
187
|
-
/* @__PURE__ */ jsx2("div", { className: "absolute inset-0 bg-[radial-gradient(circle_at_center,rgba(255,255,255,0.1)_0,transparent_100%)] pointer-events-none rounded-2xl" }),
|
|
188
|
-
brandIcon || /* @__PURE__ */ jsx2(Terminal, { className: "h-8 w-8 text-[var(--md3-primary)]" })
|
|
189
|
-
] }),
|
|
190
|
-
/* @__PURE__ */ jsx2("h1", { className: "text-3xl font-bold tracking-tight text-foreground", children: title }),
|
|
191
|
-
/* @__PURE__ */ jsx2("p", { className: "mt-2 text-[var(--md3-on-surface-variant)]", children: subtitle })
|
|
192
|
-
] }),
|
|
193
|
-
/* @__PURE__ */ jsxs2("div", { className: "w-full glass-panel-heavy p-8 border border-border shadow-sm relative overflow-hidden backdrop-blur-3xl rounded-[32px]", children: [
|
|
194
|
-
/* @__PURE__ */ jsx2("div", { className: "absolute inset-x-0 top-0 h-[1px] bg-gradient-to-r from-transparent via-[var(--md3-primary)] to-transparent opacity-50" }),
|
|
195
|
-
children
|
|
196
|
-
] })
|
|
197
|
-
] })
|
|
198
|
-
] });
|
|
183
|
+
/* @__PURE__ */ jsx2("div", { className: "w-full bg-card p-8 border border-border rounded-lg", children })
|
|
184
|
+
] }) });
|
|
199
185
|
}
|
|
200
186
|
|
|
201
187
|
export {
|
|
@@ -12,13 +12,13 @@ var buttonVariants = cva(
|
|
|
12
12
|
{
|
|
13
13
|
variants: {
|
|
14
14
|
variant: {
|
|
15
|
-
default: "bg-primary
|
|
16
|
-
destructive: "bg-destructive
|
|
17
|
-
outline: "border border-border bg-card
|
|
18
|
-
secondary: "bg-muted
|
|
15
|
+
default: "bg-primary text-primary-foreground hover:bg-primary/90 active:scale-[0.97] duration-[var(--transition-fast)]",
|
|
16
|
+
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90 active:scale-[0.97] duration-[var(--transition-fast)]",
|
|
17
|
+
outline: "border border-border bg-card hover:bg-muted active:scale-[0.97] duration-[var(--transition-fast)] text-foreground",
|
|
18
|
+
secondary: "bg-muted border border-border text-foreground hover:bg-muted/80 active:scale-[0.97] duration-[var(--transition-fast)]",
|
|
19
19
|
ghost: "hover:bg-muted hover:text-foreground duration-[var(--transition-fast)] text-muted-foreground border border-transparent",
|
|
20
20
|
link: "text-primary underline-offset-4 hover:underline",
|
|
21
|
-
sandbox: "bg-[
|
|
21
|
+
sandbox: "bg-[var(--btn-primary-bg)] text-[var(--btn-primary-text)] border border-[var(--border-accent)] hover:bg-[var(--btn-primary-hover)] active:scale-[0.97] duration-[var(--transition-fast)]"
|
|
22
22
|
},
|
|
23
23
|
size: {
|
|
24
24
|
default: "h-[var(--control-height)] px-4 py-2",
|
|
@@ -10,10 +10,10 @@ import {
|
|
|
10
10
|
} from "./chunk-MA7YKRUP.js";
|
|
11
11
|
import {
|
|
12
12
|
ChatContainer
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-JLKYXLFN.js";
|
|
14
14
|
import {
|
|
15
15
|
OpenUIArtifactRenderer
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-PLTZB5BC.js";
|
|
17
17
|
import {
|
|
18
18
|
FileArtifactPane,
|
|
19
19
|
FileTree,
|
|
@@ -16,7 +16,7 @@ var DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
16
16
|
{
|
|
17
17
|
ref,
|
|
18
18
|
className: cn(
|
|
19
|
-
"fixed inset-0 z-50 bg-black/
|
|
19
|
+
"fixed inset-0 z-50 bg-black/40",
|
|
20
20
|
"data-[state=closed]:animate-out data-[state=open]:animate-in",
|
|
21
21
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
22
22
|
className
|
|
@@ -38,7 +38,7 @@ var DialogContent = React.forwardRef(({ className, children, variant = "default"
|
|
|
38
38
|
ref,
|
|
39
39
|
className: cn(
|
|
40
40
|
"fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%]",
|
|
41
|
-
"gap-4 rounded-
|
|
41
|
+
"gap-4 rounded-lg border bg-card p-6 shadow-lg duration-200",
|
|
42
42
|
"data-[state=closed]:animate-out data-[state=open]:animate-in",
|
|
43
43
|
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
44
44
|
"data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
@@ -44,6 +44,20 @@ function TemplateCard({ template, onUseTemplate, className }) {
|
|
|
44
44
|
);
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
+
// src/dashboard/info-panel.tsx
|
|
48
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
49
|
+
function InfoPanel({ label, title, description, className }) {
|
|
50
|
+
return /* @__PURE__ */ jsxs2("div", { className: cn("rounded-lg bg-[var(--brand-strong)] p-5 text-[var(--brand-strong-text)] relative overflow-hidden", className), children: [
|
|
51
|
+
/* @__PURE__ */ jsxs2("div", { className: "relative z-10", children: [
|
|
52
|
+
/* @__PURE__ */ jsx2("p", { className: "text-[10px] font-bold uppercase tracking-widest text-[var(--brand-strong-text-dim)]", children: label }),
|
|
53
|
+
/* @__PURE__ */ jsx2("h3", { className: "mt-1 text-lg font-bold", children: title }),
|
|
54
|
+
/* @__PURE__ */ jsx2("p", { className: "mt-1 text-sm text-[var(--brand-strong-text-muted)]", children: description })
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ jsx2("div", { className: "absolute right-0 top-0 h-full w-1/3 bg-white/5 -skew-x-12 translate-x-12 pointer-events-none" })
|
|
57
|
+
] });
|
|
58
|
+
}
|
|
59
|
+
|
|
47
60
|
export {
|
|
48
|
-
TemplateCard
|
|
61
|
+
TemplateCard,
|
|
62
|
+
InfoPanel
|
|
49
63
|
};
|
package/dist/dashboard.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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,
|
|
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-CsS6ydgm.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';
|
|
5
|
-
import 'react';
|
|
5
|
+
import * as React from 'react';
|
|
6
6
|
|
|
7
7
|
interface SystemLogsViewerProps {
|
|
8
8
|
apiUrl: string;
|
|
@@ -133,4 +133,24 @@ interface SnapshotListProps {
|
|
|
133
133
|
}
|
|
134
134
|
declare function SnapshotList({ snapshots, onCreate, onRestore, loading, className }: SnapshotListProps): react_jsx_runtime.JSX.Element;
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
interface PromoBannerProps {
|
|
137
|
+
title: string;
|
|
138
|
+
description: string;
|
|
139
|
+
buttonLabel: string;
|
|
140
|
+
href?: string;
|
|
141
|
+
onClick?: () => void;
|
|
142
|
+
icon?: React.ReactNode;
|
|
143
|
+
disabled?: boolean;
|
|
144
|
+
className?: string;
|
|
145
|
+
}
|
|
146
|
+
declare function PromoBanner({ title, description, buttonLabel, href, onClick, icon, disabled, className, }: PromoBannerProps): react_jsx_runtime.JSX.Element;
|
|
147
|
+
|
|
148
|
+
interface InfoPanelProps {
|
|
149
|
+
label: string;
|
|
150
|
+
title: string;
|
|
151
|
+
description: string;
|
|
152
|
+
className?: string;
|
|
153
|
+
}
|
|
154
|
+
declare function InfoPanel({ label, title, description, className }: InfoPanelProps): react_jsx_runtime.JSX.Element;
|
|
155
|
+
|
|
156
|
+
export { BackendConfig, type BackendConfigProps, type BackendStatusData, type SnapshotInfo as DashboardSnapshotInfo, type ExposedPort, type GitCommitData, GitPanel, type GitPanelProps, type GitStatusData, InfoPanel, type InfoPanelProps, type McpServer, NetworkConfig, type NetworkConfigData, type NetworkConfigProps, PortsList, type PortsListProps, type ProcessInfo, ProcessList, type ProcessListProps, PromoBanner, type PromoBannerProps, SnapshotList, type SnapshotListProps, SystemLogsViewer, type SystemLogsViewerProps, UsageSummary, type UsageSummaryData, type UsageSummaryProps };
|
package/dist/dashboard.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
InfoPanel,
|
|
2
3
|
TemplateCard
|
|
3
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VX3XOUEB.js";
|
|
4
5
|
import {
|
|
5
6
|
BackendSelector,
|
|
6
7
|
ClusterStatusBar,
|
|
@@ -33,12 +34,12 @@ import {
|
|
|
33
34
|
SidebarRailNav,
|
|
34
35
|
VariantList,
|
|
35
36
|
useSidebar
|
|
36
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-7YWFOGKQ.js";
|
|
37
38
|
import {
|
|
38
39
|
BillingDashboard,
|
|
39
40
|
PricingPage,
|
|
40
41
|
UsageChart
|
|
41
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-OHPW55EV.js";
|
|
42
43
|
import {
|
|
43
44
|
StatCard
|
|
44
45
|
} from "./chunk-OKLQVY3Y.js";
|
|
@@ -47,7 +48,7 @@ import {
|
|
|
47
48
|
Skeleton
|
|
48
49
|
} from "./chunk-66EZOYZR.js";
|
|
49
50
|
import "./chunk-ZMNSRDMH.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-MKTSMWVD.js";
|
|
51
52
|
import {
|
|
52
53
|
cn
|
|
53
54
|
} from "./chunk-RQHJBTEU.js";
|
|
@@ -873,6 +874,40 @@ function SnapshotList({ snapshots, onCreate, onRestore, loading = false, classNa
|
|
|
873
874
|
] })
|
|
874
875
|
] });
|
|
875
876
|
}
|
|
877
|
+
|
|
878
|
+
// src/dashboard/promo-banner.tsx
|
|
879
|
+
import { Fragment as Fragment2, jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
880
|
+
function PromoBanner({
|
|
881
|
+
title,
|
|
882
|
+
description,
|
|
883
|
+
buttonLabel,
|
|
884
|
+
href,
|
|
885
|
+
onClick,
|
|
886
|
+
icon,
|
|
887
|
+
disabled = false,
|
|
888
|
+
className
|
|
889
|
+
}) {
|
|
890
|
+
const buttonClasses = cn(
|
|
891
|
+
"mt-6 inline-flex items-center gap-2 rounded-md border border-white/20 bg-[var(--btn-primary-bg)] px-4 py-2 text-sm font-medium text-[var(--btn-primary-text)] transition-colors",
|
|
892
|
+
disabled ? "opacity-50 cursor-not-allowed" : "hover:bg-[var(--btn-primary-hover)]"
|
|
893
|
+
);
|
|
894
|
+
const buttonContent = /* @__PURE__ */ jsxs9(Fragment2, { children: [
|
|
895
|
+
buttonLabel,
|
|
896
|
+
/* @__PURE__ */ jsxs9("svg", { "aria-hidden": "true", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "h-4 w-4", children: [
|
|
897
|
+
/* @__PURE__ */ jsx9("path", { d: "M5 12h14" }),
|
|
898
|
+
/* @__PURE__ */ jsx9("path", { d: "m12 5 7 7-7 7" })
|
|
899
|
+
] })
|
|
900
|
+
] });
|
|
901
|
+
return /* @__PURE__ */ jsxs9("div", { className: cn("relative overflow-hidden rounded-xl bg-[var(--brand-strong)] p-8 md:flex md:items-center md:justify-between", className), children: [
|
|
902
|
+
/* @__PURE__ */ jsxs9("div", { className: "relative z-10", children: [
|
|
903
|
+
/* @__PURE__ */ jsx9("h3", { className: "text-xl font-bold text-[var(--brand-strong-text)]", children: title }),
|
|
904
|
+
/* @__PURE__ */ jsx9("p", { className: "mt-2 max-w-md text-sm text-[var(--brand-strong-text-muted)]", children: description }),
|
|
905
|
+
href && !disabled ? /* @__PURE__ */ jsx9("a", { href, target: "_blank", rel: "noopener noreferrer", onClick, className: buttonClasses, children: buttonContent }) : /* @__PURE__ */ jsx9("button", { type: "button", onClick, disabled, className: buttonClasses, children: buttonContent })
|
|
906
|
+
] }),
|
|
907
|
+
icon && /* @__PURE__ */ jsx9("div", { className: "relative z-10 mt-6 flex items-center md:mt-0", children: /* @__PURE__ */ jsx9("div", { className: "flex h-16 w-16 items-center justify-center rounded-2xl border border-white/10 bg-white/10", children: icon }) }),
|
|
908
|
+
/* @__PURE__ */ jsx9("div", { className: "pointer-events-none absolute inset-y-0 right-0 w-1/3 bg-gradient-to-l from-white/5 to-transparent" })
|
|
909
|
+
] });
|
|
910
|
+
}
|
|
876
911
|
export {
|
|
877
912
|
BackendConfig,
|
|
878
913
|
BackendSelector,
|
|
@@ -881,6 +916,7 @@ export {
|
|
|
881
916
|
CreditBalance,
|
|
882
917
|
DashboardLayout,
|
|
883
918
|
GitPanel,
|
|
919
|
+
InfoPanel,
|
|
884
920
|
InvoiceTable,
|
|
885
921
|
NetworkConfig,
|
|
886
922
|
NewSandboxCard,
|
|
@@ -891,6 +927,7 @@ export {
|
|
|
891
927
|
ProfileAvatar,
|
|
892
928
|
ProfileComparison,
|
|
893
929
|
ProfileSelector,
|
|
930
|
+
PromoBanner,
|
|
894
931
|
RailButton,
|
|
895
932
|
RailModeButton,
|
|
896
933
|
RailSeparator,
|