@tangle-network/sandbox-ui 0.2.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 +68 -0
- package/dist/auth.d.ts +57 -0
- package/dist/auth.js +14 -0
- package/dist/branding-DCi5VEik.d.ts +13 -0
- package/dist/button-BidTtuRS.d.ts +15 -0
- package/dist/chat.d.ts +121 -0
- package/dist/chat.js +25 -0
- package/dist/chunk-2UHPE5T7.js +201 -0
- package/dist/chunk-4EIWPJMJ.js +545 -0
- package/dist/chunk-6MQIDUPA.js +502 -0
- package/dist/chunk-B26TQ7SA.js +47 -0
- package/dist/chunk-E6FS7R4X.js +109 -0
- package/dist/chunk-GRYHFH5O.js +110 -0
- package/dist/chunk-HMND7JPA.js +868 -0
- package/dist/chunk-HRMUF35V.js +19 -0
- package/dist/chunk-HYEAX3DC.js +822 -0
- package/dist/chunk-KMXV7DDX.js +174 -0
- package/dist/chunk-KYY2X6LY.js +318 -0
- package/dist/chunk-L6ZDH5F4.js +334 -0
- package/dist/chunk-LTFK464G.js +103 -0
- package/dist/chunk-M34OA6PQ.js +233 -0
- package/dist/chunk-M6VLC32S.js +219 -0
- package/dist/chunk-MCGKDCOR.js +173 -0
- package/dist/chunk-NI2EI43H.js +294 -0
- package/dist/chunk-OU4TRNQZ.js +173 -0
- package/dist/chunk-QD4QE5P5.js +40 -0
- package/dist/chunk-QSQBDR3N.js +180 -0
- package/dist/chunk-RQHJBTEU.js +10 -0
- package/dist/chunk-U62G5TS7.js +472 -0
- package/dist/chunk-ZOL2TR5M.js +475 -0
- package/dist/dashboard.d.ts +111 -0
- package/dist/dashboard.js +26 -0
- package/dist/editor.d.ts +196 -0
- package/dist/editor.js +713 -0
- package/dist/expanded-tool-detail-OkXGqTHe.d.ts +52 -0
- package/dist/files.d.ts +66 -0
- package/dist/files.js +11 -0
- package/dist/hooks.d.ts +22 -0
- package/dist/hooks.js +107 -0
- package/dist/index.d.ts +107 -0
- package/dist/index.js +551 -0
- package/dist/markdown.d.ts +55 -0
- package/dist/markdown.js +17 -0
- package/dist/pages.d.ts +89 -0
- package/dist/pages.js +1181 -0
- package/dist/parts-CyGkM6Fp.d.ts +50 -0
- package/dist/primitives.d.ts +189 -0
- package/dist/primitives.js +161 -0
- package/dist/run-CtFZ6s-D.d.ts +41 -0
- package/dist/run.d.ts +14 -0
- package/dist/run.js +29 -0
- package/dist/sidecar-CFU2W9j1.d.ts +8 -0
- package/dist/stores.d.ts +28 -0
- package/dist/stores.js +49 -0
- package/dist/terminal.d.ts +44 -0
- package/dist/terminal.js +160 -0
- package/dist/tool-call-feed-D5Ume-Pt.d.ts +66 -0
- package/dist/tool-display-BvsVW_Ur.d.ts +32 -0
- package/dist/types.d.ts +6 -0
- package/dist/types.js +0 -0
- package/dist/usage-chart-DINgSVL5.d.ts +60 -0
- package/dist/use-sidecar-auth-Bb0-w3lX.d.ts +339 -0
- package/dist/utils.d.ts +28 -0
- package/dist/utils.js +28 -0
- package/dist/workspace.d.ts +113 -0
- package/dist/workspace.js +15 -0
- package/package.json +174 -0
- package/src/styles/globals.css +230 -0
- package/src/styles/tokens.css +73 -0
- package/tailwind.config.cjs +99 -0
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Card
|
|
3
|
+
} from "./chunk-2UHPE5T7.js";
|
|
4
|
+
import {
|
|
5
|
+
cn
|
|
6
|
+
} from "./chunk-RQHJBTEU.js";
|
|
7
|
+
|
|
8
|
+
// src/primitives/select.tsx
|
|
9
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
10
|
+
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
|
11
|
+
import * as React from "react";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
var Select = SelectPrimitive.Root;
|
|
14
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
15
|
+
var SelectValue = SelectPrimitive.Value;
|
|
16
|
+
var SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
17
|
+
SelectPrimitive.Trigger,
|
|
18
|
+
{
|
|
19
|
+
ref,
|
|
20
|
+
className: cn(
|
|
21
|
+
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
22
|
+
className
|
|
23
|
+
),
|
|
24
|
+
...props,
|
|
25
|
+
children: [
|
|
26
|
+
children,
|
|
27
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Icon, { asChild: true, children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 opacity-50" }) })
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
));
|
|
31
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
32
|
+
var SelectScrollUpButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
33
|
+
SelectPrimitive.ScrollUpButton,
|
|
34
|
+
{
|
|
35
|
+
ref,
|
|
36
|
+
className: cn(
|
|
37
|
+
"flex cursor-default items-center justify-center py-1",
|
|
38
|
+
className
|
|
39
|
+
),
|
|
40
|
+
...props,
|
|
41
|
+
children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
|
|
42
|
+
}
|
|
43
|
+
));
|
|
44
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
45
|
+
var SelectScrollDownButton = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
46
|
+
SelectPrimitive.ScrollDownButton,
|
|
47
|
+
{
|
|
48
|
+
ref,
|
|
49
|
+
className: cn(
|
|
50
|
+
"flex cursor-default items-center justify-center py-1",
|
|
51
|
+
className
|
|
52
|
+
),
|
|
53
|
+
...props,
|
|
54
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
|
|
55
|
+
}
|
|
56
|
+
));
|
|
57
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
58
|
+
var SelectContent = React.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
59
|
+
SelectPrimitive.Content,
|
|
60
|
+
{
|
|
61
|
+
ref,
|
|
62
|
+
className: cn(
|
|
63
|
+
"data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=closed]:animate-out data-[state=open]:animate-in",
|
|
64
|
+
position === "popper" && "data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=bottom]:translate-y-1 data-[side=top]:-translate-y-1",
|
|
65
|
+
className
|
|
66
|
+
),
|
|
67
|
+
position,
|
|
68
|
+
...props,
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
71
|
+
/* @__PURE__ */ jsx(
|
|
72
|
+
SelectPrimitive.Viewport,
|
|
73
|
+
{
|
|
74
|
+
className: cn(
|
|
75
|
+
"p-1",
|
|
76
|
+
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
77
|
+
),
|
|
78
|
+
children
|
|
79
|
+
}
|
|
80
|
+
),
|
|
81
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
) }));
|
|
85
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
86
|
+
var SelectLabel = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
87
|
+
SelectPrimitive.Label,
|
|
88
|
+
{
|
|
89
|
+
ref,
|
|
90
|
+
className: cn("px-2 py-1.5 font-semibold text-sm", className),
|
|
91
|
+
...props
|
|
92
|
+
}
|
|
93
|
+
));
|
|
94
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
95
|
+
var SelectItem = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
96
|
+
SelectPrimitive.Item,
|
|
97
|
+
{
|
|
98
|
+
ref,
|
|
99
|
+
className: cn(
|
|
100
|
+
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pr-8 pl-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
101
|
+
className
|
|
102
|
+
),
|
|
103
|
+
...props,
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ jsx("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) }) }),
|
|
106
|
+
/* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
));
|
|
110
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
111
|
+
var SelectSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
112
|
+
SelectPrimitive.Separator,
|
|
113
|
+
{
|
|
114
|
+
ref,
|
|
115
|
+
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
116
|
+
...props
|
|
117
|
+
}
|
|
118
|
+
));
|
|
119
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
120
|
+
|
|
121
|
+
// src/primitives/table.tsx
|
|
122
|
+
import * as React2 from "react";
|
|
123
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
124
|
+
var Table = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ jsx2(
|
|
125
|
+
"table",
|
|
126
|
+
{
|
|
127
|
+
ref,
|
|
128
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
129
|
+
...props
|
|
130
|
+
}
|
|
131
|
+
) }));
|
|
132
|
+
Table.displayName = "Table";
|
|
133
|
+
var TableHeader = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
134
|
+
TableHeader.displayName = "TableHeader";
|
|
135
|
+
var TableBody = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
136
|
+
"tbody",
|
|
137
|
+
{
|
|
138
|
+
ref,
|
|
139
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
140
|
+
...props
|
|
141
|
+
}
|
|
142
|
+
));
|
|
143
|
+
TableBody.displayName = "TableBody";
|
|
144
|
+
var TableFooter = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
145
|
+
"tfoot",
|
|
146
|
+
{
|
|
147
|
+
ref,
|
|
148
|
+
className: cn(
|
|
149
|
+
"border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",
|
|
150
|
+
className
|
|
151
|
+
),
|
|
152
|
+
...props
|
|
153
|
+
}
|
|
154
|
+
));
|
|
155
|
+
TableFooter.displayName = "TableFooter";
|
|
156
|
+
var TableRow = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
157
|
+
"tr",
|
|
158
|
+
{
|
|
159
|
+
ref,
|
|
160
|
+
className: cn(
|
|
161
|
+
"border-border border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
|
162
|
+
className
|
|
163
|
+
),
|
|
164
|
+
...props
|
|
165
|
+
}
|
|
166
|
+
));
|
|
167
|
+
TableRow.displayName = "TableRow";
|
|
168
|
+
var TableHead = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
169
|
+
"th",
|
|
170
|
+
{
|
|
171
|
+
ref,
|
|
172
|
+
className: cn(
|
|
173
|
+
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
|
174
|
+
className
|
|
175
|
+
),
|
|
176
|
+
...props
|
|
177
|
+
}
|
|
178
|
+
));
|
|
179
|
+
TableHead.displayName = "TableHead";
|
|
180
|
+
var TableCell = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
181
|
+
"td",
|
|
182
|
+
{
|
|
183
|
+
ref,
|
|
184
|
+
className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
|
|
185
|
+
...props
|
|
186
|
+
}
|
|
187
|
+
));
|
|
188
|
+
TableCell.displayName = "TableCell";
|
|
189
|
+
var TableCaption = React2.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx2(
|
|
190
|
+
"caption",
|
|
191
|
+
{
|
|
192
|
+
ref,
|
|
193
|
+
className: cn("mt-4 text-muted-foreground text-sm", className),
|
|
194
|
+
...props
|
|
195
|
+
}
|
|
196
|
+
));
|
|
197
|
+
TableCaption.displayName = "TableCaption";
|
|
198
|
+
|
|
199
|
+
// src/primitives/switch.tsx
|
|
200
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
201
|
+
import * as React3 from "react";
|
|
202
|
+
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
203
|
+
var Switch = React3.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx3(
|
|
204
|
+
SwitchPrimitives.Root,
|
|
205
|
+
{
|
|
206
|
+
className: cn(
|
|
207
|
+
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",
|
|
208
|
+
className
|
|
209
|
+
),
|
|
210
|
+
...props,
|
|
211
|
+
ref,
|
|
212
|
+
children: /* @__PURE__ */ jsx3(
|
|
213
|
+
SwitchPrimitives.Thumb,
|
|
214
|
+
{
|
|
215
|
+
className: cn(
|
|
216
|
+
"pointer-events-none block h-4 w-4 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
217
|
+
)
|
|
218
|
+
}
|
|
219
|
+
)
|
|
220
|
+
}
|
|
221
|
+
));
|
|
222
|
+
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
223
|
+
|
|
224
|
+
// src/primitives/toast.tsx
|
|
225
|
+
import { cva } from "class-variance-authority";
|
|
226
|
+
import {
|
|
227
|
+
AlertCircle,
|
|
228
|
+
AlertTriangle,
|
|
229
|
+
CheckCircle2,
|
|
230
|
+
Info,
|
|
231
|
+
X
|
|
232
|
+
} from "lucide-react";
|
|
233
|
+
import * as React4 from "react";
|
|
234
|
+
import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
235
|
+
var toastVariants = cva(
|
|
236
|
+
"pointer-events-auto relative flex w-full items-center justify-between gap-3 overflow-hidden rounded-lg border p-4 shadow-lg transition-all",
|
|
237
|
+
{
|
|
238
|
+
variants: {
|
|
239
|
+
variant: {
|
|
240
|
+
default: "border-border bg-background text-foreground",
|
|
241
|
+
success: "border-green-500/20 bg-green-500/10 text-green-400",
|
|
242
|
+
error: "border-red-500/20 bg-red-500/10 text-red-400",
|
|
243
|
+
warning: "border-yellow-500/20 bg-yellow-500/10 text-yellow-400",
|
|
244
|
+
info: "border-blue-500/20 bg-blue-500/10 text-blue-400"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
defaultVariants: {
|
|
248
|
+
variant: "default"
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
);
|
|
252
|
+
var icons = {
|
|
253
|
+
success: CheckCircle2,
|
|
254
|
+
error: AlertCircle,
|
|
255
|
+
warning: AlertTriangle,
|
|
256
|
+
info: Info,
|
|
257
|
+
default: Info
|
|
258
|
+
};
|
|
259
|
+
function ToastComponent({
|
|
260
|
+
id,
|
|
261
|
+
title,
|
|
262
|
+
description,
|
|
263
|
+
variant = "default",
|
|
264
|
+
onDismiss
|
|
265
|
+
}) {
|
|
266
|
+
const Icon2 = icons[variant];
|
|
267
|
+
return /* @__PURE__ */ jsxs2(
|
|
268
|
+
"div",
|
|
269
|
+
{
|
|
270
|
+
className: cn(toastVariants({ variant })),
|
|
271
|
+
role: "alert",
|
|
272
|
+
"aria-live": "polite",
|
|
273
|
+
children: [
|
|
274
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex items-start gap-3", children: [
|
|
275
|
+
/* @__PURE__ */ jsx4(Icon2, { className: "h-5 w-5 shrink-0", "aria-hidden": "true" }),
|
|
276
|
+
/* @__PURE__ */ jsxs2("div", { className: "flex-1", children: [
|
|
277
|
+
/* @__PURE__ */ jsx4("p", { className: "font-medium text-sm", children: title }),
|
|
278
|
+
description && /* @__PURE__ */ jsx4("p", { className: "mt-1 text-sm opacity-80", children: description })
|
|
279
|
+
] })
|
|
280
|
+
] }),
|
|
281
|
+
/* @__PURE__ */ jsx4(
|
|
282
|
+
"button",
|
|
283
|
+
{
|
|
284
|
+
type: "button",
|
|
285
|
+
onClick: () => onDismiss(id),
|
|
286
|
+
className: "shrink-0 rounded-md p-1 opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2",
|
|
287
|
+
"aria-label": "Dismiss notification",
|
|
288
|
+
children: /* @__PURE__ */ jsx4(X, { className: "h-4 w-4" })
|
|
289
|
+
}
|
|
290
|
+
)
|
|
291
|
+
]
|
|
292
|
+
}
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
function ToastContainer({ toasts, onDismiss }) {
|
|
296
|
+
return /* @__PURE__ */ jsx4(
|
|
297
|
+
"div",
|
|
298
|
+
{
|
|
299
|
+
className: "fixed right-4 bottom-4 z-50 flex max-w-md flex-col gap-2",
|
|
300
|
+
"aria-label": "Notifications",
|
|
301
|
+
children: toasts.map((toast) => /* @__PURE__ */ jsx4(ToastComponent, { ...toast, onDismiss }, toast.id))
|
|
302
|
+
}
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
var ToastContext = React4.createContext(null);
|
|
306
|
+
function ToastProvider({ children }) {
|
|
307
|
+
const [toasts, setToasts] = React4.useState([]);
|
|
308
|
+
const dismiss = React4.useCallback((id) => {
|
|
309
|
+
setToasts((prev) => prev.filter((t) => t.id !== id));
|
|
310
|
+
}, []);
|
|
311
|
+
const toast = React4.useCallback(
|
|
312
|
+
(input) => {
|
|
313
|
+
const id = Math.random().toString(36).slice(2);
|
|
314
|
+
const newToast = { id, ...input };
|
|
315
|
+
setToasts((prev) => [...prev, newToast]);
|
|
316
|
+
const duration = input.duration ?? 5e3;
|
|
317
|
+
if (duration > 0) {
|
|
318
|
+
setTimeout(() => dismiss(id), duration);
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
[dismiss]
|
|
322
|
+
);
|
|
323
|
+
const success = React4.useCallback(
|
|
324
|
+
(title, description) => {
|
|
325
|
+
toast({ title, description, variant: "success" });
|
|
326
|
+
},
|
|
327
|
+
[toast]
|
|
328
|
+
);
|
|
329
|
+
const error = React4.useCallback(
|
|
330
|
+
(title, description) => {
|
|
331
|
+
toast({ title, description, variant: "error" });
|
|
332
|
+
},
|
|
333
|
+
[toast]
|
|
334
|
+
);
|
|
335
|
+
const warning = React4.useCallback(
|
|
336
|
+
(title, description) => {
|
|
337
|
+
toast({ title, description, variant: "warning" });
|
|
338
|
+
},
|
|
339
|
+
[toast]
|
|
340
|
+
);
|
|
341
|
+
const info = React4.useCallback(
|
|
342
|
+
(title, description) => {
|
|
343
|
+
toast({ title, description, variant: "info" });
|
|
344
|
+
},
|
|
345
|
+
[toast]
|
|
346
|
+
);
|
|
347
|
+
const value = React4.useMemo(
|
|
348
|
+
() => ({ toasts, toast, success, error, warning, info, dismiss }),
|
|
349
|
+
[toasts, toast, success, error, warning, info, dismiss]
|
|
350
|
+
);
|
|
351
|
+
return /* @__PURE__ */ jsxs2(ToastContext.Provider, { value, children: [
|
|
352
|
+
children,
|
|
353
|
+
/* @__PURE__ */ jsx4(ToastContainer, { toasts, onDismiss: dismiss })
|
|
354
|
+
] });
|
|
355
|
+
}
|
|
356
|
+
function useToast() {
|
|
357
|
+
const context = React4.useContext(ToastContext);
|
|
358
|
+
if (!context) {
|
|
359
|
+
throw new Error("useToast must be used within a ToastProvider");
|
|
360
|
+
}
|
|
361
|
+
return context;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
// src/primitives/label.tsx
|
|
365
|
+
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
366
|
+
import { cva as cva2 } from "class-variance-authority";
|
|
367
|
+
import * as React5 from "react";
|
|
368
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
369
|
+
var labelVariants = cva2(
|
|
370
|
+
"font-medium text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
371
|
+
);
|
|
372
|
+
var Label2 = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
373
|
+
LabelPrimitive.Root,
|
|
374
|
+
{
|
|
375
|
+
ref,
|
|
376
|
+
className: cn(labelVariants(), className),
|
|
377
|
+
...props
|
|
378
|
+
}
|
|
379
|
+
));
|
|
380
|
+
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
381
|
+
|
|
382
|
+
// src/primitives/stat-card.tsx
|
|
383
|
+
import * as React6 from "react";
|
|
384
|
+
import { jsx as jsx6, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
385
|
+
var StatCard = React6.forwardRef(
|
|
386
|
+
({
|
|
387
|
+
className,
|
|
388
|
+
variant = "default",
|
|
389
|
+
title,
|
|
390
|
+
value,
|
|
391
|
+
subtitle,
|
|
392
|
+
icon,
|
|
393
|
+
trend,
|
|
394
|
+
...props
|
|
395
|
+
}, ref) => {
|
|
396
|
+
const iconColors = {
|
|
397
|
+
default: "text-muted-foreground",
|
|
398
|
+
sandbox: "text-purple-400"
|
|
399
|
+
};
|
|
400
|
+
const trendColors = {
|
|
401
|
+
positive: "text-green-400",
|
|
402
|
+
negative: "text-red-400",
|
|
403
|
+
neutral: "text-muted-foreground"
|
|
404
|
+
};
|
|
405
|
+
const trendStatus = trend ? trend.value > 0 ? "positive" : trend.value < 0 ? "negative" : "neutral" : null;
|
|
406
|
+
return /* @__PURE__ */ jsx6(
|
|
407
|
+
Card,
|
|
408
|
+
{
|
|
409
|
+
ref,
|
|
410
|
+
variant,
|
|
411
|
+
className: cn("p-6", className),
|
|
412
|
+
...props,
|
|
413
|
+
children: /* @__PURE__ */ jsxs3("div", { className: "flex items-start justify-between", children: [
|
|
414
|
+
/* @__PURE__ */ jsxs3("div", { className: "space-y-1", children: [
|
|
415
|
+
/* @__PURE__ */ jsx6("p", { className: "text-muted-foreground text-sm", children: title }),
|
|
416
|
+
/* @__PURE__ */ jsx6("p", { className: "font-bold text-3xl tracking-tight", children: value }),
|
|
417
|
+
subtitle && /* @__PURE__ */ jsx6("p", { className: "text-muted-foreground/70 text-xs", children: subtitle }),
|
|
418
|
+
trend && trendStatus && /* @__PURE__ */ jsxs3(
|
|
419
|
+
"div",
|
|
420
|
+
{
|
|
421
|
+
className: cn(
|
|
422
|
+
"flex items-center gap-1 text-sm",
|
|
423
|
+
trendColors[trendStatus]
|
|
424
|
+
),
|
|
425
|
+
children: [
|
|
426
|
+
trend.value > 0 ? "\u2191" : trend.value < 0 ? "\u2193" : "\u2192",
|
|
427
|
+
/* @__PURE__ */ jsxs3("span", { children: [
|
|
428
|
+
Math.abs(trend.value),
|
|
429
|
+
"%"
|
|
430
|
+
] }),
|
|
431
|
+
trend.label && /* @__PURE__ */ jsx6("span", { className: "text-muted-foreground", children: trend.label })
|
|
432
|
+
]
|
|
433
|
+
}
|
|
434
|
+
)
|
|
435
|
+
] }),
|
|
436
|
+
icon && /* @__PURE__ */ jsx6(
|
|
437
|
+
"div",
|
|
438
|
+
{
|
|
439
|
+
className: cn("rounded-lg bg-muted/50 p-2", iconColors[variant]),
|
|
440
|
+
children: icon
|
|
441
|
+
}
|
|
442
|
+
)
|
|
443
|
+
] })
|
|
444
|
+
}
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
);
|
|
448
|
+
StatCard.displayName = "StatCard";
|
|
449
|
+
|
|
450
|
+
export {
|
|
451
|
+
Select,
|
|
452
|
+
SelectGroup,
|
|
453
|
+
SelectValue,
|
|
454
|
+
SelectTrigger,
|
|
455
|
+
SelectScrollUpButton,
|
|
456
|
+
SelectScrollDownButton,
|
|
457
|
+
SelectContent,
|
|
458
|
+
SelectLabel,
|
|
459
|
+
SelectItem,
|
|
460
|
+
SelectSeparator,
|
|
461
|
+
Table,
|
|
462
|
+
TableHeader,
|
|
463
|
+
TableBody,
|
|
464
|
+
TableFooter,
|
|
465
|
+
TableRow,
|
|
466
|
+
TableHead,
|
|
467
|
+
TableCell,
|
|
468
|
+
TableCaption,
|
|
469
|
+
Switch,
|
|
470
|
+
ToastContainer,
|
|
471
|
+
ToastProvider,
|
|
472
|
+
useToast,
|
|
473
|
+
Label2 as Label,
|
|
474
|
+
StatCard
|
|
475
|
+
};
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
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-DINgSVL5.js';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
|
|
5
|
+
type ProductVariant = "sandbox";
|
|
6
|
+
interface NavItem {
|
|
7
|
+
id: string;
|
|
8
|
+
label: string;
|
|
9
|
+
href: string;
|
|
10
|
+
icon: React.ComponentType<{
|
|
11
|
+
className?: string;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
interface DashboardUser {
|
|
15
|
+
email: string;
|
|
16
|
+
name?: string;
|
|
17
|
+
tier?: string;
|
|
18
|
+
avatarUrl?: string;
|
|
19
|
+
}
|
|
20
|
+
interface DashboardLayoutProps {
|
|
21
|
+
children: React.ReactNode;
|
|
22
|
+
variant?: ProductVariant;
|
|
23
|
+
navItems: NavItem[];
|
|
24
|
+
activeNavId?: string;
|
|
25
|
+
user?: DashboardUser | null;
|
|
26
|
+
isLoading?: boolean;
|
|
27
|
+
onLogout?: () => void;
|
|
28
|
+
onSettingsClick?: () => void;
|
|
29
|
+
settingsHref?: string;
|
|
30
|
+
/** Custom link component (e.g., Next.js Link). Use any type to support various router implementations. */
|
|
31
|
+
LinkComponent?: React.ComponentType<any>;
|
|
32
|
+
}
|
|
33
|
+
declare function DashboardLayout({ children, variant, navItems, activeNavId, user, isLoading, onLogout, onSettingsClick, settingsHref, LinkComponent, }: DashboardLayoutProps): react_jsx_runtime.JSX.Element;
|
|
34
|
+
|
|
35
|
+
interface Backend {
|
|
36
|
+
type: string;
|
|
37
|
+
label: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
}
|
|
40
|
+
interface BackendSelectorProps {
|
|
41
|
+
backends: Backend[];
|
|
42
|
+
selected: string[];
|
|
43
|
+
onChange: (selected: string[]) => void;
|
|
44
|
+
label?: string;
|
|
45
|
+
hint?: string;
|
|
46
|
+
multiSelect?: boolean;
|
|
47
|
+
className?: string;
|
|
48
|
+
}
|
|
49
|
+
declare function BackendSelector({ backends, selected, onChange, label, hint, multiSelect, className, }: BackendSelectorProps): react_jsx_runtime.JSX.Element;
|
|
50
|
+
|
|
51
|
+
interface Profile {
|
|
52
|
+
id: string;
|
|
53
|
+
name: string;
|
|
54
|
+
description?: string;
|
|
55
|
+
is_builtin?: boolean;
|
|
56
|
+
extends?: string;
|
|
57
|
+
model?: string;
|
|
58
|
+
metrics?: {
|
|
59
|
+
total_runs: number;
|
|
60
|
+
success_rate: number;
|
|
61
|
+
avg_duration_ms: number;
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
interface ProfileSelectorProps {
|
|
65
|
+
profiles: Profile[];
|
|
66
|
+
selectedId?: string | null;
|
|
67
|
+
onSelect: (profile: Profile | null) => void;
|
|
68
|
+
onCreateClick?: () => void;
|
|
69
|
+
onManageClick?: () => void;
|
|
70
|
+
label?: string;
|
|
71
|
+
placeholder?: string;
|
|
72
|
+
showMetrics?: boolean;
|
|
73
|
+
className?: string;
|
|
74
|
+
}
|
|
75
|
+
declare function ProfileSelector({ profiles, selectedId, onSelect, onCreateClick, onManageClick, label, placeholder, showMetrics, className, }: ProfileSelectorProps): react_jsx_runtime.JSX.Element;
|
|
76
|
+
/**
|
|
77
|
+
* Profile performance comparison card.
|
|
78
|
+
* Shows metrics from multiple profiles side by side.
|
|
79
|
+
*/
|
|
80
|
+
interface ProfileComparisonProps {
|
|
81
|
+
profiles: Profile[];
|
|
82
|
+
className?: string;
|
|
83
|
+
}
|
|
84
|
+
declare function ProfileComparison({ profiles, className, }: ProfileComparisonProps): react_jsx_runtime.JSX.Element | null;
|
|
85
|
+
|
|
86
|
+
type VariantStatus = "pending" | "running" | "completed" | "failed" | "cancelled";
|
|
87
|
+
type VariantOutcome = "pending_review" | "accepted" | "rejected" | "merged_with_conflicts" | "expired";
|
|
88
|
+
interface Variant {
|
|
89
|
+
id: string;
|
|
90
|
+
label: string;
|
|
91
|
+
sublabel?: string;
|
|
92
|
+
status: VariantStatus;
|
|
93
|
+
outcome?: VariantOutcome;
|
|
94
|
+
durationMs?: number;
|
|
95
|
+
error?: string;
|
|
96
|
+
summary?: string;
|
|
97
|
+
/** Link to view variant details (e.g., chat UI) */
|
|
98
|
+
detailsUrl?: string;
|
|
99
|
+
}
|
|
100
|
+
interface VariantListProps {
|
|
101
|
+
variants: Variant[];
|
|
102
|
+
selectedId?: string | null;
|
|
103
|
+
onSelect?: (id: string) => void;
|
|
104
|
+
onAccept?: (id: string) => void;
|
|
105
|
+
onReject?: (id: string) => void;
|
|
106
|
+
isActioning?: string | null;
|
|
107
|
+
className?: string;
|
|
108
|
+
}
|
|
109
|
+
declare function VariantList({ variants, selectedId, onSelect, onAccept, onReject, isActioning, className, }: VariantListProps): react_jsx_runtime.JSX.Element;
|
|
110
|
+
|
|
111
|
+
export { type Backend, BackendSelector, type BackendSelectorProps, DashboardLayout, type DashboardLayoutProps, type Profile as DashboardProfile, type DashboardUser, type NavItem, type ProductVariant, ProfileComparison, type ProfileComparisonProps, ProfileSelector, type ProfileSelectorProps, type Variant, VariantList, type VariantListProps, type VariantOutcome, type VariantStatus };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BackendSelector,
|
|
3
|
+
DashboardLayout,
|
|
4
|
+
ProfileComparison,
|
|
5
|
+
ProfileSelector,
|
|
6
|
+
VariantList
|
|
7
|
+
} from "./chunk-HMND7JPA.js";
|
|
8
|
+
import {
|
|
9
|
+
BillingDashboard,
|
|
10
|
+
PricingPage,
|
|
11
|
+
UsageChart
|
|
12
|
+
} from "./chunk-4EIWPJMJ.js";
|
|
13
|
+
import "./chunk-MCGKDCOR.js";
|
|
14
|
+
import "./chunk-2UHPE5T7.js";
|
|
15
|
+
import "./chunk-E6FS7R4X.js";
|
|
16
|
+
import "./chunk-RQHJBTEU.js";
|
|
17
|
+
export {
|
|
18
|
+
BackendSelector,
|
|
19
|
+
BillingDashboard,
|
|
20
|
+
DashboardLayout,
|
|
21
|
+
PricingPage,
|
|
22
|
+
ProfileComparison,
|
|
23
|
+
ProfileSelector,
|
|
24
|
+
UsageChart,
|
|
25
|
+
VariantList
|
|
26
|
+
};
|