@tangle-network/sandbox-ui 0.6.1 → 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.d.ts +10 -6
- package/dist/auth.js +3 -3
- package/dist/{chat-container-Cg-GwyiK.d.ts → chat-container-f4yEs6KN.d.ts} +9 -1
- package/dist/chat.d.ts +12 -2
- package/dist/chat.js +10 -10
- package/dist/{chunk-WBQ7VULC.js → chunk-34A66VBG.js} +7 -7
- package/dist/{chunk-JP725R4W.js → chunk-34I7UFSX.js} +2 -2
- package/dist/{chunk-CNWVHQFY.js → chunk-54SQQMMM.js} +6 -24
- package/dist/{chunk-DLCFZDGX.js → chunk-5UM2XMEJ.js} +39 -14
- package/dist/{chunk-YYGECNZZ.js → chunk-66EZOYZR.js} +3 -3
- package/dist/{chunk-6V4XVKFY.js → chunk-7YWFOGKQ.js} +344 -338
- package/dist/{chunk-DCPYTL4W.js → chunk-D4CZWJCD.js} +72 -148
- package/dist/{chunk-XTPAWK7L.js → chunk-DI3NZ5ZX.js} +15 -51
- package/dist/{chunk-MXRQ4MJE.js → chunk-DXMIEK4K.js} +34 -23
- package/dist/{chunk-ZMWWE5RF.js → chunk-EXSOPXIY.js} +141 -123
- package/dist/{chunk-GW4GRAWJ.js → chunk-GSZA3TSY.js} +18 -12
- package/dist/{chunk-W4LM3QYZ.js → chunk-HB5Y37YU.js} +8 -8
- package/dist/{chunk-RKXIRRKQ.js → chunk-JLKYXLFN.js} +70 -66
- package/dist/{chunk-BRBTD7RH.js → chunk-MA7YKRUP.js} +28 -18
- package/dist/{chunk-TSE423UF.js → chunk-MKTSMWVD.js} +6 -6
- package/dist/{chunk-MJUDMVRU.js → chunk-MT5FJ3ZT.js} +17 -17
- package/dist/{chunk-565V6JTN.js → chunk-OHPW55EV.js} +60 -99
- package/dist/chunk-OKLQVY3Y.js +139 -0
- package/dist/{chunk-OVNLOE3Y.js → chunk-PLTZB5BC.js} +41 -41
- package/dist/{chunk-E2XT3G52.js → chunk-QC4BJEG6.js} +136 -137
- package/dist/{chunk-KH5UDAJ2.js → chunk-QDH5GEGY.js} +58 -54
- package/dist/{chunk-33W2TLUL.js → chunk-QID2OOMG.js} +12 -3
- package/dist/{chunk-FJSVPBKY.js → chunk-S7OXQTST.js} +17 -3
- package/dist/chunk-T7HMZEVO.js +216 -0
- package/dist/{chunk-FNYJFCGU.js → chunk-U6QTHMY6.js} +145 -256
- package/dist/{chunk-YS66Q3RC.js → chunk-US6JKJKH.js} +2 -2
- package/dist/chunk-VX3XOUEB.js +63 -0
- package/dist/{chunk-TDYQBLL5.js → chunk-ZMNSRDMH.js} +6 -6
- package/dist/dashboard.d.ts +156 -4
- package/dist/dashboard.js +885 -8
- package/dist/{document-editor-pane-DWWUTTTZ.js → document-editor-pane-TLPVRBBU.js} +3 -3
- package/dist/editor.d.ts +9 -8
- package/dist/editor.js +3 -3
- package/dist/files.js +3 -3
- package/dist/globals.css +4787 -69
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +7 -7
- package/dist/index.d.ts +4 -4
- package/dist/index.js +28 -28
- package/dist/markdown.js +1 -1
- package/dist/openui.js +5 -5
- package/dist/pages.d.ts +114 -5
- package/dist/pages.js +1978 -365
- package/dist/primitives.d.ts +5 -2
- package/dist/primitives.js +10 -10
- package/dist/run.js +4 -4
- package/dist/sdk-hooks.d.ts +2 -3
- package/dist/sdk-hooks.js +5 -5
- package/dist/styles.css +4787 -69
- package/dist/template-card-BAtvcAkU.d.ts +18 -0
- package/dist/terminal.d.ts +3 -1
- package/dist/terminal.js +66 -32
- package/dist/tokens.css +289 -237
- package/dist/{usage-chart-XCoB_7Xu.d.ts → usage-chart-SSiOgeQI.d.ts} +3 -1
- package/dist/{use-pty-session-COzVkhtc.d.ts → use-pty-session-0AOuwXgq.d.ts} +2 -0
- package/dist/{index-BT_-ecpc.d.ts → variant-list-CsS6ydgm.d.ts} +16 -7
- package/dist/workspace.d.ts +2 -2
- package/dist/workspace.js +13 -13
- package/package.json +18 -3
- package/tailwind.config.cjs +3 -2
- package/dist/chunk-3HW53XTH.js +0 -228
- package/dist/chunk-OKCIKTXQ.js +0 -63
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Card
|
|
3
|
-
} from "./chunk-TDYQBLL5.js";
|
|
4
1
|
import {
|
|
5
2
|
cn
|
|
6
3
|
} from "./chunk-RQHJBTEU.js";
|
|
@@ -18,7 +15,7 @@ var SelectTrigger = React.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
18
15
|
{
|
|
19
16
|
ref,
|
|
20
17
|
className: cn(
|
|
21
|
-
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-
|
|
18
|
+
"flex h-9 w-full items-center justify-between whitespace-nowrap rounded-md border border-border bg-card px-3 py-2 text-sm shadow-sm placeholder:text-muted-foreground focus:outline-none focus:ring-1 focus:ring-primary disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",
|
|
22
19
|
className
|
|
23
20
|
),
|
|
24
21
|
...props,
|
|
@@ -60,7 +57,7 @@ var SelectContent = React.forwardRef(({ className, children, position = "popper"
|
|
|
60
57
|
{
|
|
61
58
|
ref,
|
|
62
59
|
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 border-
|
|
60
|
+
"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 border-border bg-card text-foreground shadow-[var(--shadow-card)] data-[state=closed]:animate-out data-[state=open]:animate-in",
|
|
64
61
|
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
62
|
className
|
|
66
63
|
),
|
|
@@ -97,7 +94,7 @@ var SelectItem = React.forwardRef(({ className, children, ...props }, ref) => /*
|
|
|
97
94
|
{
|
|
98
95
|
ref,
|
|
99
96
|
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-
|
|
97
|
+
"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-muted/50 focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
101
98
|
className
|
|
102
99
|
),
|
|
103
100
|
...props,
|
|
@@ -112,7 +109,7 @@ var SelectSeparator = React.forwardRef(({ className, ...props }, ref) => /* @__P
|
|
|
112
109
|
SelectPrimitive.Separator,
|
|
113
110
|
{
|
|
114
111
|
ref,
|
|
115
|
-
className: cn("-mx-1 my-1 h-px bg-
|
|
112
|
+
className: cn("-mx-1 my-1 h-px bg-border", className),
|
|
116
113
|
...props
|
|
117
114
|
}
|
|
118
115
|
));
|
|
@@ -301,83 +298,11 @@ var Label2 = React4.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
301
298
|
));
|
|
302
299
|
Label2.displayName = LabelPrimitive.Root.displayName;
|
|
303
300
|
|
|
304
|
-
// src/primitives/stat-card.tsx
|
|
305
|
-
import * as React5 from "react";
|
|
306
|
-
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
307
|
-
var StatCard = React5.forwardRef(
|
|
308
|
-
({
|
|
309
|
-
className,
|
|
310
|
-
variant = "default",
|
|
311
|
-
title,
|
|
312
|
-
value,
|
|
313
|
-
subtitle,
|
|
314
|
-
icon,
|
|
315
|
-
trend,
|
|
316
|
-
...props
|
|
317
|
-
}, ref) => {
|
|
318
|
-
const iconColors = {
|
|
319
|
-
default: "text-[var(--text-muted)]",
|
|
320
|
-
sandbox: "text-[var(--accent-text)]"
|
|
321
|
-
};
|
|
322
|
-
const trendColors = {
|
|
323
|
-
positive: "text-[var(--surface-success-text)]",
|
|
324
|
-
negative: "text-[var(--surface-danger-text)]",
|
|
325
|
-
neutral: "text-[var(--text-muted)]"
|
|
326
|
-
};
|
|
327
|
-
const trendStatus = trend ? trend.value > 0 ? "positive" : trend.value < 0 ? "negative" : "neutral" : null;
|
|
328
|
-
return /* @__PURE__ */ jsx5(
|
|
329
|
-
Card,
|
|
330
|
-
{
|
|
331
|
-
ref,
|
|
332
|
-
variant,
|
|
333
|
-
className: cn("p-6", className),
|
|
334
|
-
...props,
|
|
335
|
-
children: /* @__PURE__ */ jsxs3("div", { className: "flex items-start justify-between", children: [
|
|
336
|
-
/* @__PURE__ */ jsxs3("div", { className: "space-y-1", children: [
|
|
337
|
-
/* @__PURE__ */ jsx5("p", { className: "text-[var(--text-muted)] text-sm", children: title }),
|
|
338
|
-
/* @__PURE__ */ jsx5("p", { className: "font-bold text-3xl tracking-tight", children: value }),
|
|
339
|
-
subtitle && /* @__PURE__ */ jsx5("p", { className: "text-[var(--text-muted)] opacity-70 text-xs", children: subtitle }),
|
|
340
|
-
trend && trendStatus && /* @__PURE__ */ jsxs3(
|
|
341
|
-
"div",
|
|
342
|
-
{
|
|
343
|
-
className: cn(
|
|
344
|
-
"flex items-center gap-1 text-sm",
|
|
345
|
-
trendColors[trendStatus]
|
|
346
|
-
),
|
|
347
|
-
children: [
|
|
348
|
-
trend.value > 0 ? "\u2191" : trend.value < 0 ? "\u2193" : "\u2192",
|
|
349
|
-
/* @__PURE__ */ jsxs3("span", { children: [
|
|
350
|
-
Math.abs(trend.value),
|
|
351
|
-
"%"
|
|
352
|
-
] }),
|
|
353
|
-
trend.label && /* @__PURE__ */ jsx5("span", { className: "text-[var(--text-muted)]", children: trend.label })
|
|
354
|
-
]
|
|
355
|
-
}
|
|
356
|
-
)
|
|
357
|
-
] }),
|
|
358
|
-
icon && /* @__PURE__ */ jsx5(
|
|
359
|
-
"div",
|
|
360
|
-
{
|
|
361
|
-
className: cn(
|
|
362
|
-
"rounded-lg bg-[var(--depth-3)] p-2",
|
|
363
|
-
variant === "sandbox" && "bg-[var(--accent-surface-soft)]",
|
|
364
|
-
iconColors[variant]
|
|
365
|
-
),
|
|
366
|
-
children: icon
|
|
367
|
-
}
|
|
368
|
-
)
|
|
369
|
-
] })
|
|
370
|
-
}
|
|
371
|
-
);
|
|
372
|
-
}
|
|
373
|
-
);
|
|
374
|
-
StatCard.displayName = "StatCard";
|
|
375
|
-
|
|
376
301
|
// src/primitives/terminal-display.tsx
|
|
377
|
-
import * as
|
|
302
|
+
import * as React5 from "react";
|
|
378
303
|
import { useEffect, useRef } from "react";
|
|
379
|
-
import { jsx as
|
|
380
|
-
var TerminalDisplay =
|
|
304
|
+
import { jsx as jsx5, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
305
|
+
var TerminalDisplay = React5.forwardRef(
|
|
381
306
|
({
|
|
382
307
|
className,
|
|
383
308
|
variant = "default",
|
|
@@ -395,22 +320,22 @@ var TerminalDisplay = React6.forwardRef(
|
|
|
395
320
|
}
|
|
396
321
|
}, [autoScroll]);
|
|
397
322
|
const variants = {
|
|
398
|
-
default: "border-
|
|
399
|
-
sandbox: "border-
|
|
323
|
+
default: "border-border",
|
|
324
|
+
sandbox: "border-border shadow-[var(--shadow-accent)]"
|
|
400
325
|
};
|
|
401
|
-
return /* @__PURE__ */
|
|
326
|
+
return /* @__PURE__ */ jsxs3(
|
|
402
327
|
"div",
|
|
403
328
|
{
|
|
404
329
|
ref,
|
|
405
330
|
className: cn(
|
|
406
|
-
"overflow-hidden rounded-xl border bg-
|
|
331
|
+
"overflow-hidden rounded-xl border bg-background font-mono text-sm",
|
|
407
332
|
variants[variant],
|
|
408
333
|
className
|
|
409
334
|
),
|
|
410
335
|
...props,
|
|
411
336
|
children: [
|
|
412
|
-
showHeader && /* @__PURE__ */
|
|
413
|
-
/* @__PURE__ */
|
|
337
|
+
showHeader && /* @__PURE__ */ jsx5("div", { className: "flex items-center border-b border-border bg-card px-4 py-3", children: /* @__PURE__ */ jsx5("span", { className: "text-muted-foreground text-xs", children: title }) }),
|
|
338
|
+
/* @__PURE__ */ jsx5(
|
|
414
339
|
"div",
|
|
415
340
|
{
|
|
416
341
|
ref: containerRef,
|
|
@@ -425,19 +350,19 @@ var TerminalDisplay = React6.forwardRef(
|
|
|
425
350
|
}
|
|
426
351
|
);
|
|
427
352
|
TerminalDisplay.displayName = "TerminalDisplay";
|
|
428
|
-
var TerminalLine =
|
|
353
|
+
var TerminalLine = React5.forwardRef(
|
|
429
354
|
({ className, type = "output", prompt = "$", timestamp, children, ...props }, ref) => {
|
|
430
355
|
const typeStyles = {
|
|
431
|
-
input: "text-
|
|
432
|
-
output: "text-
|
|
356
|
+
input: "text-foreground",
|
|
357
|
+
output: "text-foreground",
|
|
433
358
|
error: "text-[var(--surface-danger-text)]",
|
|
434
359
|
success: "text-[var(--surface-success-text)]",
|
|
435
360
|
info: "text-[var(--surface-info-text)]",
|
|
436
361
|
thinking: "text-[var(--surface-warning-text)] animate-pulse",
|
|
437
|
-
command: "text-
|
|
362
|
+
command: "text-foreground",
|
|
438
363
|
warning: "text-[var(--surface-warning-text)]"
|
|
439
364
|
};
|
|
440
|
-
return /* @__PURE__ */
|
|
365
|
+
return /* @__PURE__ */ jsxs3(
|
|
441
366
|
"div",
|
|
442
367
|
{
|
|
443
368
|
ref,
|
|
@@ -448,35 +373,35 @@ var TerminalLine = React6.forwardRef(
|
|
|
448
373
|
),
|
|
449
374
|
...props,
|
|
450
375
|
children: [
|
|
451
|
-
(type === "input" || type === "command") && /* @__PURE__ */
|
|
452
|
-
type === "thinking" && /* @__PURE__ */
|
|
453
|
-
timestamp && /* @__PURE__ */
|
|
376
|
+
(type === "input" || type === "command") && /* @__PURE__ */ jsx5("span", { className: "shrink-0 select-none text-[var(--surface-success-text)]", children: prompt }),
|
|
377
|
+
type === "thinking" && /* @__PURE__ */ jsx5("span", { className: "shrink-0 select-none", children: "..." }),
|
|
378
|
+
timestamp && /* @__PURE__ */ jsxs3("span", { className: "shrink-0 select-none text-muted-foreground opacity-50", children: [
|
|
454
379
|
"[",
|
|
455
380
|
timestamp,
|
|
456
381
|
"]"
|
|
457
382
|
] }),
|
|
458
|
-
/* @__PURE__ */
|
|
383
|
+
/* @__PURE__ */ jsx5("span", { className: "whitespace-pre-wrap break-all", children })
|
|
459
384
|
]
|
|
460
385
|
}
|
|
461
386
|
);
|
|
462
387
|
}
|
|
463
388
|
);
|
|
464
389
|
TerminalLine.displayName = "TerminalLine";
|
|
465
|
-
var TerminalCursor =
|
|
390
|
+
var TerminalCursor = React5.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx5(
|
|
466
391
|
"span",
|
|
467
392
|
{
|
|
468
393
|
ref,
|
|
469
394
|
className: cn(
|
|
470
|
-
"ml-0.5 inline-block h-4 w-2 animate-pulse bg-
|
|
395
|
+
"ml-0.5 inline-block h-4 w-2 animate-pulse bg-foreground",
|
|
471
396
|
className
|
|
472
397
|
),
|
|
473
398
|
...props
|
|
474
399
|
}
|
|
475
400
|
));
|
|
476
401
|
TerminalCursor.displayName = "TerminalCursor";
|
|
477
|
-
var TerminalInput =
|
|
402
|
+
var TerminalInput = React5.forwardRef(
|
|
478
403
|
({ className, onSubmit, variant = "default", ...props }, ref) => {
|
|
479
|
-
const [value, setValue] =
|
|
404
|
+
const [value, setValue] = React5.useState("");
|
|
480
405
|
const handleKeyDown = (e) => {
|
|
481
406
|
if (e.key === "Enter" && value.trim() && onSubmit) {
|
|
482
407
|
onSubmit(value.trim());
|
|
@@ -484,20 +409,20 @@ var TerminalInput = React6.forwardRef(
|
|
|
484
409
|
}
|
|
485
410
|
};
|
|
486
411
|
const variants = {
|
|
487
|
-
default: "border-
|
|
488
|
-
sandbox: "border-
|
|
412
|
+
default: "border-border focus-within:border-border",
|
|
413
|
+
sandbox: "border-border focus-within:border-[var(--border-accent-hover)]"
|
|
489
414
|
};
|
|
490
|
-
return /* @__PURE__ */
|
|
415
|
+
return /* @__PURE__ */ jsxs3(
|
|
491
416
|
"div",
|
|
492
417
|
{
|
|
493
418
|
className: cn(
|
|
494
|
-
"flex items-center rounded-lg border bg-
|
|
419
|
+
"flex items-center rounded-lg border bg-background px-4 py-2.5 font-mono text-sm transition-colors",
|
|
495
420
|
variants[variant],
|
|
496
421
|
className
|
|
497
422
|
),
|
|
498
423
|
children: [
|
|
499
|
-
/* @__PURE__ */
|
|
500
|
-
/* @__PURE__ */
|
|
424
|
+
/* @__PURE__ */ jsx5("span", { className: "mr-2 select-none text-[var(--surface-success-text)]", children: "$" }),
|
|
425
|
+
/* @__PURE__ */ jsx5(
|
|
501
426
|
"input",
|
|
502
427
|
{
|
|
503
428
|
ref,
|
|
@@ -505,11 +430,11 @@ var TerminalInput = React6.forwardRef(
|
|
|
505
430
|
value,
|
|
506
431
|
onChange: (e) => setValue(e.target.value),
|
|
507
432
|
onKeyDown: handleKeyDown,
|
|
508
|
-
className: "flex-1 bg-transparent text-
|
|
433
|
+
className: "flex-1 bg-transparent text-foreground outline-none placeholder:text-muted-foreground",
|
|
509
434
|
...props
|
|
510
435
|
}
|
|
511
436
|
),
|
|
512
|
-
/* @__PURE__ */
|
|
437
|
+
/* @__PURE__ */ jsx5(TerminalCursor, {})
|
|
513
438
|
]
|
|
514
439
|
}
|
|
515
440
|
);
|
|
@@ -519,7 +444,7 @@ TerminalInput.displayName = "TerminalInput";
|
|
|
519
444
|
|
|
520
445
|
// src/primitives/drop-zone.tsx
|
|
521
446
|
import { useCallback as useCallback2, useRef as useRef2, useState as useState3 } from "react";
|
|
522
|
-
import { jsx as
|
|
447
|
+
import { jsx as jsx6, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
523
448
|
function DropZone({
|
|
524
449
|
onDrop,
|
|
525
450
|
accept,
|
|
@@ -575,7 +500,7 @@ function DropZone({
|
|
|
575
500
|
},
|
|
576
501
|
[disabled, accept, isAccepted, onDrop]
|
|
577
502
|
);
|
|
578
|
-
return /* @__PURE__ */
|
|
503
|
+
return /* @__PURE__ */ jsxs4(
|
|
579
504
|
"div",
|
|
580
505
|
{
|
|
581
506
|
onDragEnter: handleDragEnter,
|
|
@@ -584,15 +509,15 @@ function DropZone({
|
|
|
584
509
|
onDrop: handleDrop,
|
|
585
510
|
className: cn("relative", className),
|
|
586
511
|
children: [
|
|
587
|
-
dragOver && (overlay || /* @__PURE__ */
|
|
588
|
-
/* @__PURE__ */
|
|
589
|
-
/* @__PURE__ */
|
|
590
|
-
/* @__PURE__ */
|
|
591
|
-
/* @__PURE__ */
|
|
592
|
-
/* @__PURE__ */
|
|
512
|
+
dragOver && (overlay || /* @__PURE__ */ jsx6("div", { className: "fixed inset-0 z-[100] flex items-center justify-center pointer-events-none bg-background", children: /* @__PURE__ */ jsxs4("div", { className: "rounded-2xl border-2 border-dashed border-border bg-card p-16 text-center shadow-[var(--shadow-dropdown)] max-w-lg mx-auto", children: [
|
|
513
|
+
/* @__PURE__ */ jsx6("div", { className: "mx-auto mb-6 flex h-20 w-20 items-center justify-center rounded-2xl border border-border bg-[var(--accent-surface-soft)]", children: typeof icon === "string" ? /* @__PURE__ */ jsxs4("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", className: "h-10 w-10 text-[var(--accent-text)]", children: [
|
|
514
|
+
/* @__PURE__ */ jsx6("title", { children: "Upload" }),
|
|
515
|
+
/* @__PURE__ */ jsx6("path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }),
|
|
516
|
+
/* @__PURE__ */ jsx6("polyline", { points: "17 8 12 3 7 8" }),
|
|
517
|
+
/* @__PURE__ */ jsx6("line", { x1: "12", x2: "12", y1: "3", y2: "15" })
|
|
593
518
|
] }) : icon }),
|
|
594
|
-
/* @__PURE__ */
|
|
595
|
-
/* @__PURE__ */
|
|
519
|
+
/* @__PURE__ */ jsx6("h2", { className: "text-2xl font-bold text-foreground", children: title }),
|
|
520
|
+
/* @__PURE__ */ jsx6("p", { className: "mt-2 text-sm text-muted-foreground", children: description })
|
|
596
521
|
] }) })),
|
|
597
522
|
children
|
|
598
523
|
]
|
|
@@ -602,7 +527,7 @@ function DropZone({
|
|
|
602
527
|
|
|
603
528
|
// src/primitives/upload-progress.tsx
|
|
604
529
|
import { AlertCircle as AlertCircle2, CheckCircle2 as CheckCircle22, FileText, Loader2, RefreshCw, X as X2 } from "lucide-react";
|
|
605
|
-
import { jsx as
|
|
530
|
+
import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
606
531
|
function formatSize(bytes) {
|
|
607
532
|
if (bytes < 1024) return `${bytes}B`;
|
|
608
533
|
if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(0)}KB`;
|
|
@@ -610,49 +535,49 @@ function formatSize(bytes) {
|
|
|
610
535
|
}
|
|
611
536
|
function UploadProgress({ files, onRemove, onRetry, className }) {
|
|
612
537
|
if (files.length === 0) return null;
|
|
613
|
-
return /* @__PURE__ */
|
|
538
|
+
return /* @__PURE__ */ jsx7("div", { className: cn("space-y-2", className), children: files.map((file) => /* @__PURE__ */ jsxs5(
|
|
614
539
|
"div",
|
|
615
540
|
{
|
|
616
541
|
className: cn(
|
|
617
542
|
"flex items-center gap-3 rounded-lg border px-3 py-2 text-sm",
|
|
618
|
-
file.status === "error" ? "border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)]" : file.status === "complete" ? "border-[var(--surface-success-border)] bg-[var(--surface-success-bg)]" : "border-
|
|
543
|
+
file.status === "error" ? "border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)]" : file.status === "complete" ? "border-[var(--surface-success-border)] bg-[var(--surface-success-bg)]" : "border-border bg-card"
|
|
619
544
|
),
|
|
620
545
|
children: [
|
|
621
|
-
file.status === "complete" && /* @__PURE__ */
|
|
622
|
-
file.status === "error" && /* @__PURE__ */
|
|
623
|
-
file.status === "uploading" && /* @__PURE__ */
|
|
624
|
-
file.status === "pending" && /* @__PURE__ */
|
|
625
|
-
/* @__PURE__ */
|
|
626
|
-
/* @__PURE__ */
|
|
627
|
-
/* @__PURE__ */
|
|
628
|
-
/* @__PURE__ */
|
|
546
|
+
file.status === "complete" && /* @__PURE__ */ jsx7(CheckCircle22, { className: "h-4 w-4 shrink-0 text-[var(--surface-success-text)]" }),
|
|
547
|
+
file.status === "error" && /* @__PURE__ */ jsx7(AlertCircle2, { className: "h-4 w-4 shrink-0 text-[var(--surface-danger-text)]" }),
|
|
548
|
+
file.status === "uploading" && /* @__PURE__ */ jsx7(Loader2, { className: "h-4 w-4 shrink-0 animate-spin text-primary" }),
|
|
549
|
+
file.status === "pending" && /* @__PURE__ */ jsx7(FileText, { className: "h-4 w-4 shrink-0 text-muted-foreground" }),
|
|
550
|
+
/* @__PURE__ */ jsxs5("div", { className: "min-w-0 flex-1", children: [
|
|
551
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex items-center gap-2", children: [
|
|
552
|
+
/* @__PURE__ */ jsx7("span", { className: "truncate font-medium text-foreground", children: file.name }),
|
|
553
|
+
/* @__PURE__ */ jsx7("span", { className: "shrink-0 text-xs text-muted-foreground", children: formatSize(file.size) })
|
|
629
554
|
] }),
|
|
630
|
-
file.status === "uploading" && file.progress !== void 0 && /* @__PURE__ */
|
|
555
|
+
file.status === "uploading" && file.progress !== void 0 && /* @__PURE__ */ jsx7("div", { className: "mt-1 h-1 w-full overflow-hidden rounded-full bg-muted/50", children: /* @__PURE__ */ jsx7(
|
|
631
556
|
"div",
|
|
632
557
|
{
|
|
633
|
-
className: "h-full rounded-full bg-
|
|
558
|
+
className: "h-full rounded-full bg-primary transition-all",
|
|
634
559
|
style: { width: `${file.progress}%` }
|
|
635
560
|
}
|
|
636
561
|
) }),
|
|
637
|
-
file.status === "error" && file.error && /* @__PURE__ */
|
|
562
|
+
file.status === "error" && file.error && /* @__PURE__ */ jsx7("p", { className: "mt-0.5 text-xs text-[var(--surface-danger-text)]", children: file.error })
|
|
638
563
|
] }),
|
|
639
|
-
/* @__PURE__ */
|
|
640
|
-
file.status === "error" && onRetry && /* @__PURE__ */
|
|
564
|
+
/* @__PURE__ */ jsxs5("div", { className: "flex shrink-0 items-center gap-1", children: [
|
|
565
|
+
file.status === "error" && onRetry && /* @__PURE__ */ jsx7(
|
|
641
566
|
"button",
|
|
642
567
|
{
|
|
643
568
|
type: "button",
|
|
644
569
|
onClick: () => onRetry(file.id),
|
|
645
|
-
className: "rounded p-1 text-
|
|
646
|
-
children: /* @__PURE__ */
|
|
570
|
+
className: "rounded p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
|
|
571
|
+
children: /* @__PURE__ */ jsx7(RefreshCw, { className: "h-3.5 w-3.5" })
|
|
647
572
|
}
|
|
648
573
|
),
|
|
649
|
-
onRemove && /* @__PURE__ */
|
|
574
|
+
onRemove && /* @__PURE__ */ jsx7(
|
|
650
575
|
"button",
|
|
651
576
|
{
|
|
652
577
|
type: "button",
|
|
653
578
|
onClick: () => onRemove(file.id),
|
|
654
|
-
className: "rounded p-1 text-
|
|
655
|
-
children: /* @__PURE__ */
|
|
579
|
+
className: "rounded p-1 text-muted-foreground transition-colors hover:bg-accent hover:text-foreground",
|
|
580
|
+
children: /* @__PURE__ */ jsx7(X2, { className: "h-3.5 w-3.5" })
|
|
656
581
|
}
|
|
657
582
|
)
|
|
658
583
|
] })
|
|
@@ -665,7 +590,7 @@ function UploadProgress({ files, onRemove, onRetry, className }) {
|
|
|
665
590
|
// src/primitives/sidebar-drop-zone.tsx
|
|
666
591
|
import { useCallback as useCallback3, useRef as useRef3, useState as useState4 } from "react";
|
|
667
592
|
import { Upload } from "lucide-react";
|
|
668
|
-
import { jsx as
|
|
593
|
+
import { jsx as jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
669
594
|
function SidebarDropZone({
|
|
670
595
|
onDrop,
|
|
671
596
|
accept,
|
|
@@ -725,7 +650,7 @@ function SidebarDropZone({
|
|
|
725
650
|
[disabled, accept, isAccepted, onDrop]
|
|
726
651
|
);
|
|
727
652
|
const isVisible = persistent || dragOver;
|
|
728
|
-
return /* @__PURE__ */
|
|
653
|
+
return /* @__PURE__ */ jsx8(
|
|
729
654
|
"div",
|
|
730
655
|
{
|
|
731
656
|
onDragEnter: handleDragEnter,
|
|
@@ -739,16 +664,16 @@ function SidebarDropZone({
|
|
|
739
664
|
disabled && "opacity-50 pointer-events-none",
|
|
740
665
|
className
|
|
741
666
|
),
|
|
742
|
-
children: isVisible && /* @__PURE__ */
|
|
743
|
-
/* @__PURE__ */
|
|
667
|
+
children: isVisible && /* @__PURE__ */ jsxs6("div", { className: "flex flex-col items-center gap-2 text-center", children: [
|
|
668
|
+
/* @__PURE__ */ jsx8("div", { className: cn(
|
|
744
669
|
"flex h-8 w-8 items-center justify-center rounded-lg transition-colors",
|
|
745
670
|
dragOver ? "bg-[var(--brand-cool,hsl(var(--primary)))]/15 text-[var(--brand-cool,hsl(var(--primary)))]" : "text-[var(--text-muted,hsl(var(--muted-foreground)))]"
|
|
746
|
-
), children: icon ?? /* @__PURE__ */
|
|
747
|
-
/* @__PURE__ */
|
|
671
|
+
), children: icon ?? /* @__PURE__ */ jsx8(Upload, { className: "h-4 w-4" }) }),
|
|
672
|
+
/* @__PURE__ */ jsx8("p", { className: cn(
|
|
748
673
|
"text-xs font-medium",
|
|
749
674
|
dragOver ? "text-[var(--text-primary,hsl(var(--foreground)))]" : "text-[var(--text-muted,hsl(var(--muted-foreground)))]"
|
|
750
675
|
), children: title }),
|
|
751
|
-
description && /* @__PURE__ */
|
|
676
|
+
description && /* @__PURE__ */ jsx8("p", { className: "text-[10px] text-[var(--text-muted,hsl(var(--muted-foreground)))]", children: description })
|
|
752
677
|
] })
|
|
753
678
|
}
|
|
754
679
|
);
|
|
@@ -770,7 +695,6 @@ export {
|
|
|
770
695
|
ToastProvider,
|
|
771
696
|
useToast,
|
|
772
697
|
Label2 as Label,
|
|
773
|
-
StatCard,
|
|
774
698
|
TerminalDisplay,
|
|
775
699
|
TerminalLine,
|
|
776
700
|
TerminalCursor,
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
DropdownMenuLabel,
|
|
9
9
|
DropdownMenuSeparator,
|
|
10
10
|
DropdownMenuTrigger
|
|
11
|
-
} from "./chunk-
|
|
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";
|
|
@@ -165,59 +165,23 @@ function AuthHeader({
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
// src/auth/login-layout.tsx
|
|
168
|
-
import {
|
|
169
|
-
import {
|
|
168
|
+
import { Terminal } from "lucide-react";
|
|
169
|
+
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
170
170
|
function LoginLayout({
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
terminalLines = [
|
|
175
|
-
"Initializing secure environment...",
|
|
176
|
-
"DONE Encrypted bridge established.",
|
|
177
|
-
"Awaiting user authentication..."
|
|
178
|
-
],
|
|
179
|
-
footerLinks = [
|
|
180
|
-
{ label: "Documentation", href: "/docs" },
|
|
181
|
-
{ label: "Support", href: "/support" }
|
|
182
|
-
],
|
|
171
|
+
title = "Welcome Back",
|
|
172
|
+
subtitle = "Sign in to your workspace.",
|
|
173
|
+
brandIcon,
|
|
183
174
|
children,
|
|
184
175
|
className
|
|
185
176
|
}) {
|
|
186
|
-
return /* @__PURE__ */
|
|
187
|
-
/* @__PURE__ */
|
|
188
|
-
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
/* @__PURE__ */ jsxs2("div", { className: "max-w-lg space-y-6", children: [
|
|
195
|
-
tagline ? /* @__PURE__ */ jsx2("div", { className: "text-5xl lg:text-7xl font-bold tracking-tight leading-none text-[var(--text-primary)]", children: tagline }) : /* @__PURE__ */ jsxs2("h1", { className: "text-5xl lg:text-7xl font-bold tracking-tight leading-none", children: [
|
|
196
|
-
"Orchestrate ",
|
|
197
|
-
/* @__PURE__ */ jsx2("br", {}),
|
|
198
|
-
/* @__PURE__ */ jsx2("span", { className: "text-[var(--brand-cool)]", children: "Agents" }),
|
|
199
|
-
" in Flow."
|
|
200
|
-
] }),
|
|
201
|
-
/* @__PURE__ */ jsx2("p", { className: "text-[var(--text-muted)] text-lg leading-relaxed font-light", children: subtitle }),
|
|
202
|
-
/* @__PURE__ */ jsxs2("div", { className: "mt-12 bg-[var(--depth-2)] rounded-xl border border-[var(--border-subtle)] overflow-hidden", children: [
|
|
203
|
-
/* @__PURE__ */ jsx2("div", { className: "bg-[var(--depth-1)] border-b border-[var(--border-subtle)] px-4 py-2 flex items-center gap-2", children: /* @__PURE__ */ jsx2("span", { className: "font-mono text-xs text-[var(--text-muted)]", children: "tangle --init-node" }) }),
|
|
204
|
-
/* @__PURE__ */ jsx2("div", { className: "p-6 font-mono text-xs space-y-2", children: terminalLines.map((line, i) => /* @__PURE__ */ jsxs2("div", { className: "flex gap-4", children: [
|
|
205
|
-
/* @__PURE__ */ jsx2("span", { className: "text-[var(--brand-cool)] opacity-60", children: String(i + 1).padStart(2, "0") }),
|
|
206
|
-
line.startsWith("DONE") ? /* @__PURE__ */ jsxs2(Fragment, { children: [
|
|
207
|
-
/* @__PURE__ */ jsx2("span", { className: "text-[var(--code-success)]", children: "DONE" }),
|
|
208
|
-
/* @__PURE__ */ jsx2("span", { className: "text-[var(--text-primary)]", children: line.replace("DONE ", "") })
|
|
209
|
-
] }) : /* @__PURE__ */ jsx2("span", { className: "text-[var(--text-secondary)]", children: line })
|
|
210
|
-
] }, i)) })
|
|
211
|
-
] })
|
|
212
|
-
] }),
|
|
213
|
-
/* @__PURE__ */ jsx2("nav", { className: "flex gap-8 text-sm font-medium text-[var(--text-muted)]", children: footerLinks.map((link) => /* @__PURE__ */ jsxs2("a", { href: link.href, className: "hover:text-[var(--brand-cool)] transition-colors flex items-center gap-2", children: [
|
|
214
|
-
link.label === "Documentation" ? /* @__PURE__ */ jsx2(BookOpen, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx2(HelpCircle, { className: "h-4 w-4" }),
|
|
215
|
-
link.label
|
|
216
|
-
] }, link.href)) })
|
|
217
|
-
] }),
|
|
218
|
-
/* @__PURE__ */ jsx2("section", { className: "w-full md:w-1/2 flex items-center justify-center p-6 lg:p-24 relative", children: /* @__PURE__ */ jsx2("div", { className: "w-full max-w-md bg-[var(--depth-2)] rounded-[2rem] p-8 lg:p-12 shadow-2xl border border-[var(--border-subtle)]", children }) })
|
|
219
|
-
] })
|
|
220
|
-
] });
|
|
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 })
|
|
182
|
+
] }),
|
|
183
|
+
/* @__PURE__ */ jsx2("div", { className: "w-full bg-card p-8 border border-border rounded-lg", children })
|
|
184
|
+
] }) });
|
|
221
185
|
}
|
|
222
186
|
|
|
223
187
|
export {
|