@tangle-network/sandbox-ui 0.3.5 → 0.3.7
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/dist/{chat-container-C8eHLw8z.d.ts → chat-container-B34uj-J1.d.ts} +6 -1
- package/dist/chat.d.ts +2 -1
- package/dist/chat.js +5 -1
- package/dist/{chunk-TXI4MZAZ.js → chunk-CSIXZEKN.js} +152 -1
- package/dist/{chunk-HY5IBRCE.js → chunk-DMYYQXPN.js} +407 -250
- package/dist/{chunk-4F2GJRGU.js → chunk-PXRPYAMM.js} +101 -4
- package/dist/{chunk-QGI5E7JD.js → chunk-ZSNOGOUX.js} +1 -1
- package/dist/dashboard.d.ts +1 -1
- package/dist/dashboard.js +7 -1
- package/dist/{index-BOjBJwzD.d.ts → index-BJIPTCKk.d.ts} +46 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +14 -4
- package/dist/primitives.d.ts +45 -1
- package/dist/primitives.js +5 -1
- package/dist/workspace.d.ts +1 -1
- package/dist/workspace.js +2 -2
- package/package.json +1 -1
|
@@ -14,6 +14,9 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
getToolDisplayMetadata
|
|
16
16
|
} from "./chunk-BX6AQMUS.js";
|
|
17
|
+
import {
|
|
18
|
+
OpenUIArtifactRenderer
|
|
19
|
+
} from "./chunk-YDBXQQLC.js";
|
|
17
20
|
import {
|
|
18
21
|
Markdown
|
|
19
22
|
} from "./chunk-LTFK464G.js";
|
|
@@ -516,6 +519,52 @@ import {
|
|
|
516
519
|
} from "react";
|
|
517
520
|
import { ArrowDown } from "lucide-react";
|
|
518
521
|
import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
522
|
+
var OPENUI_NODE_TYPES = /* @__PURE__ */ new Set([
|
|
523
|
+
"heading",
|
|
524
|
+
"text",
|
|
525
|
+
"badge",
|
|
526
|
+
"stat",
|
|
527
|
+
"key_value",
|
|
528
|
+
"code",
|
|
529
|
+
"markdown",
|
|
530
|
+
"table",
|
|
531
|
+
"actions",
|
|
532
|
+
"separator",
|
|
533
|
+
"stack",
|
|
534
|
+
"grid",
|
|
535
|
+
"card"
|
|
536
|
+
]);
|
|
537
|
+
function isOpenUINode(value) {
|
|
538
|
+
return typeof value === "object" && value !== null && "type" in value && typeof value.type === "string" && OPENUI_NODE_TYPES.has(value.type);
|
|
539
|
+
}
|
|
540
|
+
function extractOpenUISchema(output) {
|
|
541
|
+
if (output == null) return null;
|
|
542
|
+
if (isOpenUINode(output)) return [output];
|
|
543
|
+
if (Array.isArray(output) && output.length > 0 && output.every(isOpenUINode)) {
|
|
544
|
+
return output;
|
|
545
|
+
}
|
|
546
|
+
if (typeof output === "object" && !Array.isArray(output)) {
|
|
547
|
+
const obj = output;
|
|
548
|
+
for (const key of ["openui", "schema", "ui"]) {
|
|
549
|
+
if (obj[key]) {
|
|
550
|
+
const inner = obj[key];
|
|
551
|
+
if (isOpenUINode(inner)) return [inner];
|
|
552
|
+
if (Array.isArray(inner) && inner.length > 0 && inner.every(isOpenUINode)) {
|
|
553
|
+
return inner;
|
|
554
|
+
}
|
|
555
|
+
}
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
if (typeof output === "string") {
|
|
559
|
+
try {
|
|
560
|
+
const parsed = JSON.parse(output);
|
|
561
|
+
return extractOpenUISchema(parsed);
|
|
562
|
+
} catch {
|
|
563
|
+
return null;
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
return null;
|
|
567
|
+
}
|
|
519
568
|
function formatUnknown(value) {
|
|
520
569
|
if (value == null) return void 0;
|
|
521
570
|
if (typeof value === "string") return value;
|
|
@@ -563,7 +612,7 @@ function mapToolPartToTimelineType(part) {
|
|
|
563
612
|
return "unknown";
|
|
564
613
|
}
|
|
565
614
|
}
|
|
566
|
-
function buildTimelineItems(messages, partMap, isStreaming) {
|
|
615
|
+
function buildTimelineItems(messages, partMap, isStreaming, onOpenUIAction, enableOpenUI = true) {
|
|
567
616
|
const items = [];
|
|
568
617
|
const lastAssistantMessage = [...messages].reverse().find((message) => message.role === "assistant");
|
|
569
618
|
const toToolCall = (part) => {
|
|
@@ -611,6 +660,18 @@ function buildTimelineItems(messages, partMap, isStreaming) {
|
|
|
611
660
|
calls: toolBuffer.map((part) => toToolCall(part))
|
|
612
661
|
});
|
|
613
662
|
}
|
|
663
|
+
if (enableOpenUI) {
|
|
664
|
+
for (const part of toolBuffer) {
|
|
665
|
+
if (part.state.status !== "completed" || !part.state.output) continue;
|
|
666
|
+
const schema = extractOpenUISchema(part.state.output);
|
|
667
|
+
if (!schema) continue;
|
|
668
|
+
items.push({
|
|
669
|
+
id: `${message.id}-openui-${part.id}`,
|
|
670
|
+
kind: "custom",
|
|
671
|
+
content: /* @__PURE__ */ jsx7("div", { className: "my-2 rounded-[var(--radius-lg)] border border-[var(--border-subtle)] bg-[var(--bg-card)] p-4 shadow-[var(--shadow-card)]", children: /* @__PURE__ */ jsx7(OpenUIArtifactRenderer, { schema, onAction: onOpenUIAction }) })
|
|
672
|
+
});
|
|
673
|
+
}
|
|
674
|
+
}
|
|
614
675
|
toolBuffer.length = 0;
|
|
615
676
|
};
|
|
616
677
|
parts.forEach((part, index) => {
|
|
@@ -621,6 +682,40 @@ function buildTimelineItems(messages, partMap, isStreaming) {
|
|
|
621
682
|
}
|
|
622
683
|
flushToolBuffer(index);
|
|
623
684
|
if (part.type === "text" && !part.synthetic && part.text.trim()) {
|
|
685
|
+
if (enableOpenUI) {
|
|
686
|
+
const jsonMatch = part.text.match(/```(?:json)?\s*\n([\s\S]*?)\n```/);
|
|
687
|
+
if (jsonMatch) {
|
|
688
|
+
const schema = extractOpenUISchema(jsonMatch[1]);
|
|
689
|
+
if (schema) {
|
|
690
|
+
const beforeJson = part.text.slice(0, part.text.indexOf("```")).trim();
|
|
691
|
+
if (beforeJson) {
|
|
692
|
+
items.push({
|
|
693
|
+
id: `${itemId}-text`,
|
|
694
|
+
kind: "message",
|
|
695
|
+
role: "assistant",
|
|
696
|
+
content: beforeJson,
|
|
697
|
+
timestamp: createdAtFromMessage(message)
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
items.push({
|
|
701
|
+
id: `${itemId}-openui`,
|
|
702
|
+
kind: "custom",
|
|
703
|
+
content: /* @__PURE__ */ jsx7("div", { className: "my-2 rounded-[var(--radius-lg)] border border-[var(--border-subtle)] bg-[var(--bg-card)] p-4 shadow-[var(--shadow-card)]", children: /* @__PURE__ */ jsx7(OpenUIArtifactRenderer, { schema, onAction: onOpenUIAction }) })
|
|
704
|
+
});
|
|
705
|
+
const afterJson = part.text.slice(part.text.lastIndexOf("```") + 3).trim();
|
|
706
|
+
if (afterJson) {
|
|
707
|
+
items.push({
|
|
708
|
+
id: `${itemId}-after`,
|
|
709
|
+
kind: "message",
|
|
710
|
+
role: "assistant",
|
|
711
|
+
content: afterJson,
|
|
712
|
+
timestamp: createdAtFromMessage(message)
|
|
713
|
+
});
|
|
714
|
+
}
|
|
715
|
+
return;
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
624
719
|
items.push({
|
|
625
720
|
id: itemId,
|
|
626
721
|
kind: "message",
|
|
@@ -665,7 +760,9 @@ var ChatContainer = memo3(
|
|
|
665
760
|
pendingFiles,
|
|
666
761
|
onRemoveFile,
|
|
667
762
|
onAttach,
|
|
668
|
-
disabled = false
|
|
763
|
+
disabled = false,
|
|
764
|
+
onOpenUIAction,
|
|
765
|
+
enableOpenUI = true
|
|
669
766
|
}) => {
|
|
670
767
|
const scrollRef = useRef2(null);
|
|
671
768
|
const groups = useRunGroups({ messages, partMap, isStreaming });
|
|
@@ -677,8 +774,8 @@ var ChatContainer = memo3(
|
|
|
677
774
|
isStreaming
|
|
678
775
|
]);
|
|
679
776
|
const timeline = useMemo(
|
|
680
|
-
() => buildTimelineItems(messages, partMap, isStreaming),
|
|
681
|
-
[messages, partMap, isStreaming]
|
|
777
|
+
() => buildTimelineItems(messages, partMap, isStreaming, onOpenUIAction, enableOpenUI),
|
|
778
|
+
[messages, partMap, isStreaming, onOpenUIAction, enableOpenUI]
|
|
682
779
|
);
|
|
683
780
|
const handleSend = useCallback2(
|
|
684
781
|
(text) => {
|
package/dist/dashboard.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as AppSidebar, a as AppSidebarProps, B as Backend, b as BackendSelector, c as BackendSelectorProps, C as ClusterStatusBar, d as ClusterStatusBarProps, e as ClusterStatusItem, D as DashboardLayout,
|
|
1
|
+
export { A as AppSidebar, a as AppSidebarProps, B as Backend, b as BackendSelector, c as BackendSelectorProps, C as ClusterStatusBar, d as ClusterStatusBarProps, e as ClusterStatusItem, f as CreditBalance, g as CreditBalanceProps, D as DashboardLayout, h as DashboardLayoutProps, G as DashboardProfile, i as DashboardUser, I as Invoice, j as InvoiceTable, k as InvoiceTableProps, N as NavItem, l as NewSandboxCard, m as NewSandboxCardProps, P as PlanCardData, n as PlanCards, o as PlanCardsProps, H as PlanFeature, J as ProductVariant, p as ProfileComparison, q as ProfileComparisonProps, r as ProfileSelector, s as ProfileSelectorProps, R as ResourceMeter, t as ResourceMeterProps, S as SandboxCard, u as SandboxCardData, v as SandboxCardProps, w as SandboxStatus, x as SandboxTable, y as SandboxTableProps, z as SidebarNavItem, E as SidebarSandbox, K as Variant, V as VariantList, F as VariantListProps, L as VariantOutcome, M as VariantStatus } from './index-BJIPTCKk.js';
|
|
2
2
|
export { a as BillingBalance, c as BillingDashboard, d as BillingDashboardProps, B as BillingSubscription, b as BillingUsage, e as PricingPage, f as PricingPageProps, P as PricingTier, g as UsageChart, h as UsageChartProps, U as UsageDataPoint } from './usage-chart-CY9xo3KX.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
package/dist/dashboard.js
CHANGED
|
@@ -2,15 +2,18 @@ import {
|
|
|
2
2
|
AppSidebar,
|
|
3
3
|
BackendSelector,
|
|
4
4
|
ClusterStatusBar,
|
|
5
|
+
CreditBalance,
|
|
5
6
|
DashboardLayout,
|
|
7
|
+
InvoiceTable,
|
|
6
8
|
NewSandboxCard,
|
|
9
|
+
PlanCards,
|
|
7
10
|
ProfileComparison,
|
|
8
11
|
ProfileSelector,
|
|
9
12
|
ResourceMeter,
|
|
10
13
|
SandboxCard,
|
|
11
14
|
SandboxTable,
|
|
12
15
|
VariantList
|
|
13
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DMYYQXPN.js";
|
|
14
17
|
import {
|
|
15
18
|
BillingDashboard,
|
|
16
19
|
PricingPage,
|
|
@@ -27,8 +30,11 @@ export {
|
|
|
27
30
|
BackendSelector,
|
|
28
31
|
BillingDashboard,
|
|
29
32
|
ClusterStatusBar,
|
|
33
|
+
CreditBalance,
|
|
30
34
|
DashboardLayout,
|
|
35
|
+
InvoiceTable,
|
|
31
36
|
NewSandboxCard,
|
|
37
|
+
PlanCards,
|
|
32
38
|
PricingPage,
|
|
33
39
|
ProfileComparison,
|
|
34
40
|
ProfileSelector,
|
|
@@ -39,6 +39,51 @@ interface ClusterStatusBarProps {
|
|
|
39
39
|
}
|
|
40
40
|
declare function ClusterStatusBar({ items, latency, className }: ClusterStatusBarProps): react_jsx_runtime.JSX.Element;
|
|
41
41
|
|
|
42
|
+
interface CreditBalanceProps {
|
|
43
|
+
amount: number;
|
|
44
|
+
description?: string;
|
|
45
|
+
onTopUp?: (amount: number) => void;
|
|
46
|
+
quickAmounts?: number[];
|
|
47
|
+
className?: string;
|
|
48
|
+
}
|
|
49
|
+
declare function CreditBalance({ amount, description, onTopUp, quickAmounts, className, }: CreditBalanceProps): react_jsx_runtime.JSX.Element;
|
|
50
|
+
|
|
51
|
+
interface Invoice {
|
|
52
|
+
id: string;
|
|
53
|
+
date: string;
|
|
54
|
+
amount: number;
|
|
55
|
+
status: "paid" | "pending" | "failed";
|
|
56
|
+
}
|
|
57
|
+
interface InvoiceTableProps {
|
|
58
|
+
invoices: Invoice[];
|
|
59
|
+
onExportAll?: () => void;
|
|
60
|
+
onLoadMore?: () => void;
|
|
61
|
+
onViewInvoice?: (id: string) => void;
|
|
62
|
+
hasMore?: boolean;
|
|
63
|
+
className?: string;
|
|
64
|
+
}
|
|
65
|
+
declare function InvoiceTable({ invoices, onExportAll, onLoadMore, onViewInvoice, hasMore, className }: InvoiceTableProps): react_jsx_runtime.JSX.Element;
|
|
66
|
+
|
|
67
|
+
interface PlanFeature {
|
|
68
|
+
text: string;
|
|
69
|
+
}
|
|
70
|
+
interface PlanCardData {
|
|
71
|
+
id: string;
|
|
72
|
+
name: string;
|
|
73
|
+
price: number;
|
|
74
|
+
period?: string;
|
|
75
|
+
features: PlanFeature[];
|
|
76
|
+
popular?: boolean;
|
|
77
|
+
current?: boolean;
|
|
78
|
+
ctaLabel?: string;
|
|
79
|
+
onSelect?: (id: string) => void;
|
|
80
|
+
}
|
|
81
|
+
interface PlanCardsProps {
|
|
82
|
+
plans: PlanCardData[];
|
|
83
|
+
className?: string;
|
|
84
|
+
}
|
|
85
|
+
declare function PlanCards({ plans, className }: PlanCardsProps): react_jsx_runtime.JSX.Element;
|
|
86
|
+
|
|
42
87
|
type ProductVariant = "sandbox";
|
|
43
88
|
interface NavItem {
|
|
44
89
|
id: string;
|
|
@@ -216,4 +261,4 @@ interface VariantListProps {
|
|
|
216
261
|
}
|
|
217
262
|
declare function VariantList({ variants, selectedId, onSelect, onAccept, onReject, isActioning, className, }: VariantListProps): react_jsx_runtime.JSX.Element;
|
|
218
263
|
|
|
219
|
-
export { AppSidebar as A, type Backend as B, ClusterStatusBar as C, DashboardLayout as D, type NavItem as N,
|
|
264
|
+
export { AppSidebar as A, type Backend as B, ClusterStatusBar as C, DashboardLayout as D, type SidebarSandbox as E, type VariantListProps as F, type Profile as G, type PlanFeature as H, type Invoice as I, type ProductVariant as J, type Variant as K, type VariantOutcome as L, type VariantStatus as M, type NavItem as N, type PlanCardData as P, ResourceMeter as R, SandboxCard as S, type TopNavLink as T, VariantList as V, type AppSidebarProps as a, BackendSelector as b, type BackendSelectorProps as c, type ClusterStatusBarProps as d, type ClusterStatusItem as e, CreditBalance as f, type CreditBalanceProps as g, type DashboardLayoutProps as h, type DashboardUser as i, InvoiceTable as j, type InvoiceTableProps as k, NewSandboxCard as l, type NewSandboxCardProps as m, PlanCards as n, type PlanCardsProps as o, ProfileComparison as p, type ProfileComparisonProps as q, ProfileSelector as r, type ProfileSelectorProps as s, type ResourceMeterProps as t, type SandboxCardData as u, type SandboxCardProps as v, type SandboxStatus as w, SandboxTable as x, type SandboxTableProps as y, type SidebarNavItem as z };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { B as Button, a as ButtonProps, b as buttonVariants } from './button-CMQuQEW_.js';
|
|
2
|
-
export { Avatar, AvatarFallback, AvatarImage, Badge, BadgeProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EmptyStateProps, Input, InputProps, Label, Logo, LogoProps, Progress, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Skeleton, SkeletonCard, SkeletonTable, StatCard, StatCardProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TangleKnot, TerminalDisplay, TerminalCursor as TerminalDisplayCursor, TerminalInput as TerminalDisplayInput, TerminalLine as TerminalDisplayLine, Textarea, TextareaProps, Toast, ToastContainer, ToastProvider, badgeVariants, useToast } from './primitives.js';
|
|
2
|
+
export { Avatar, AvatarFallback, AvatarImage, Badge, BadgeProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropZone, DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, EmptyStateProps, Input, InputProps, Label, Logo, LogoProps, Progress, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Skeleton, SkeletonCard, SkeletonTable, StatCard, StatCardProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TangleKnot, TerminalDisplay, TerminalCursor as TerminalDisplayCursor, TerminalInput as TerminalDisplayInput, TerminalLine as TerminalDisplayLine, Textarea, TextareaProps, Toast, ToastContainer, ToastProvider, UploadFile, UploadProgress, UploadProgressProps, badgeVariants, useToast } from './primitives.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import React__default from 'react';
|
|
@@ -7,13 +7,13 @@ export { AgentWorkbench, AuditCheck, AuditResults, AuditResultsProps, BannerType
|
|
|
7
7
|
export { A as ArtifactPane, a as ArtifactPaneProps, F as FileNode, b as FileTabData, c as FileTabs, d as FileTabsProps, e as FileTree, f as FileTreeProps, g as FileTreeVisibilityOptions, h as filterFileTree } from './file-tabs-CmaoDVBI.js';
|
|
8
8
|
export { OpenUIAction, OpenUIActionsNode, OpenUIArtifactRenderer, OpenUIArtifactRendererProps, OpenUIBadgeNode, OpenUICardNode, OpenUICodeNode, OpenUIComponentNode, OpenUIGridNode, OpenUIHeadingNode, OpenUIKeyValueNode, OpenUIMarkdownNode, OpenUIPrimitive, OpenUISeparatorNode, OpenUIStackNode, OpenUIStatNode, OpenUITableNode, OpenUITextNode } from './openui.js';
|
|
9
9
|
export { AgentTimeline, AgentTimelineArtifactItem, AgentTimelineCustomItem, AgentTimelineItem, AgentTimelineMessageItem, AgentTimelineProps, AgentTimelineStatusItem, AgentTimelineTone, AgentTimelineToolGroupItem, AgentTimelineToolItem, ChatMessage, ChatMessageProps, MessageList, MessageRole, ThinkingIndicator, ThinkingIndicatorProps, UserMessage } from './chat.js';
|
|
10
|
-
export { C as ChatContainer, a as ChatInput, b as ChatInputProps, P as PendingFile } from './chat-container-
|
|
10
|
+
export { C as ChatContainer, a as ChatInput, b as ChatInputProps, P as PendingFile } from './chat-container-B34uj-J1.js';
|
|
11
11
|
export { F as FeedSegment, T as ToolCallData, a as ToolCallFeed, b as ToolCallFeedProps, c as ToolCallGroup, d as ToolCallGroupProps, e as ToolCallStatus, f as ToolCallStep, g as ToolCallStepProps, h as ToolCallType, p as parseToolEvent } from './tool-call-feed-D5Ume-Pt.js';
|
|
12
12
|
export { E as ExpandedToolDetail, I as InlineThinkingItem, c as InlineToolItem, R as RunGroup } from './expanded-tool-detail-BDi_h_dZ.js';
|
|
13
13
|
import { b as ToolPart } from './parts-CyGkM6Fp.js';
|
|
14
14
|
export { R as ReasoningPart, S as SessionMessage, a as SessionPart, T as TextPart, c as ToolState, d as ToolStatus, e as ToolTime } from './parts-CyGkM6Fp.js';
|
|
15
15
|
export { FileArtifactPane, FileArtifactPaneProps, FilePreview, FilePreviewProps } from './files.js';
|
|
16
|
-
export { A as AppSidebar, a as AppSidebarProps, B as Backend, b as BackendSelector, c as BackendSelectorProps, C as ClusterStatusBar, d as ClusterStatusBarProps, e as ClusterStatusItem, D as DashboardLayout,
|
|
16
|
+
export { A as AppSidebar, a as AppSidebarProps, B as Backend, b as BackendSelector, c as BackendSelectorProps, C as ClusterStatusBar, d as ClusterStatusBarProps, e as ClusterStatusItem, f as CreditBalance, g as CreditBalanceProps, D as DashboardLayout, h as DashboardLayoutProps, i as DashboardUser, I as Invoice, j as InvoiceTable, k as InvoiceTableProps, N as NavItem, l as NewSandboxCard, m as NewSandboxCardProps, P as PlanCardData, n as PlanCards, o as PlanCardsProps, p as ProfileComparison, q as ProfileComparisonProps, r as ProfileSelector, s as ProfileSelectorProps, R as ResourceMeter, t as ResourceMeterProps, S as SandboxCard, u as SandboxCardData, v as SandboxCardProps, w as SandboxStatus, x as SandboxTable, y as SandboxTableProps, z as SidebarNavItem, E as SidebarSandbox, T as TopNavLink, V as VariantList, F as VariantListProps } from './index-BJIPTCKk.js';
|
|
17
17
|
export { c as BillingDashboard, d as BillingDashboardProps, e as PricingCards, f as PricingPageProps, g as UsageChart, h as UsageChartProps, U as UsageDataPoint } from './usage-chart-CY9xo3KX.js';
|
|
18
18
|
export { AuthHeader, GitHubLoginButton, LoginLayout, LoginLayoutProps, UserMenu } from './auth.js';
|
|
19
19
|
export { CodeBlock, CopyButton, Markdown, MarkdownProps } from './markdown.js';
|
package/dist/index.js
CHANGED
|
@@ -25,6 +25,7 @@ import {
|
|
|
25
25
|
useToolCallStream
|
|
26
26
|
} from "./chunk-5LV6DZZF.js";
|
|
27
27
|
import {
|
|
28
|
+
DropZone,
|
|
28
29
|
Label,
|
|
29
30
|
Select,
|
|
30
31
|
SelectContent,
|
|
@@ -44,8 +45,9 @@ import {
|
|
|
44
45
|
TerminalLine,
|
|
45
46
|
ToastContainer,
|
|
46
47
|
ToastProvider,
|
|
48
|
+
UploadProgress,
|
|
47
49
|
useToast
|
|
48
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-CSIXZEKN.js";
|
|
49
51
|
import {
|
|
50
52
|
Avatar,
|
|
51
53
|
AvatarFallback,
|
|
@@ -81,7 +83,7 @@ import {
|
|
|
81
83
|
StatusBar,
|
|
82
84
|
TerminalPanel,
|
|
83
85
|
WorkspaceLayout
|
|
84
|
-
} from "./chunk-
|
|
86
|
+
} from "./chunk-ZSNOGOUX.js";
|
|
85
87
|
import {
|
|
86
88
|
EmptyState,
|
|
87
89
|
Input,
|
|
@@ -95,7 +97,7 @@ import {
|
|
|
95
97
|
MessageList,
|
|
96
98
|
ThinkingIndicator,
|
|
97
99
|
UserMessage
|
|
98
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-PXRPYAMM.js";
|
|
99
101
|
import {
|
|
100
102
|
useAutoScroll,
|
|
101
103
|
useRunCollapseState,
|
|
@@ -160,15 +162,18 @@ import {
|
|
|
160
162
|
AppSidebar,
|
|
161
163
|
BackendSelector,
|
|
162
164
|
ClusterStatusBar,
|
|
165
|
+
CreditBalance,
|
|
163
166
|
DashboardLayout,
|
|
167
|
+
InvoiceTable,
|
|
164
168
|
NewSandboxCard,
|
|
169
|
+
PlanCards,
|
|
165
170
|
ProfileComparison,
|
|
166
171
|
ProfileSelector,
|
|
167
172
|
ResourceMeter,
|
|
168
173
|
SandboxCard,
|
|
169
174
|
SandboxTable,
|
|
170
175
|
VariantList
|
|
171
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-DMYYQXPN.js";
|
|
172
177
|
import {
|
|
173
178
|
BillingDashboard,
|
|
174
179
|
PricingPage,
|
|
@@ -331,6 +336,7 @@ export {
|
|
|
331
336
|
CodeBlock as CodeBlockDisplay,
|
|
332
337
|
CommandPreview,
|
|
333
338
|
CopyButton,
|
|
339
|
+
CreditBalance,
|
|
334
340
|
DashboardLayout,
|
|
335
341
|
Dialog,
|
|
336
342
|
DialogClose,
|
|
@@ -344,6 +350,7 @@ export {
|
|
|
344
350
|
DialogTrigger,
|
|
345
351
|
DiffPreview,
|
|
346
352
|
DirectoryPane,
|
|
353
|
+
DropZone,
|
|
347
354
|
DropdownMenu,
|
|
348
355
|
DropdownMenuCheckboxItem,
|
|
349
356
|
DropdownMenuContent,
|
|
@@ -372,6 +379,7 @@ export {
|
|
|
372
379
|
InlineThinkingItem,
|
|
373
380
|
InlineToolItem,
|
|
374
381
|
Input,
|
|
382
|
+
InvoiceTable,
|
|
375
383
|
Label,
|
|
376
384
|
LoginLayout,
|
|
377
385
|
Logo,
|
|
@@ -379,6 +387,7 @@ export {
|
|
|
379
387
|
MessageList,
|
|
380
388
|
NewSandboxCard,
|
|
381
389
|
OpenUIArtifactRenderer,
|
|
390
|
+
PlanCards,
|
|
382
391
|
PricingPage as PricingCards,
|
|
383
392
|
ProfileComparison,
|
|
384
393
|
ProfileSelector,
|
|
@@ -434,6 +443,7 @@ export {
|
|
|
434
443
|
ToolCallFeed,
|
|
435
444
|
ToolCallGroup,
|
|
436
445
|
ToolCallStep,
|
|
446
|
+
UploadProgress,
|
|
437
447
|
UsageChart,
|
|
438
448
|
UserMenu,
|
|
439
449
|
UserMessage,
|
package/dist/primitives.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { B as Button, a as ButtonProps, b as buttonVariants } from './button-CMQuQEW_.js';
|
|
2
2
|
import * as React$1 from 'react';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
3
4
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
5
|
import * as DialogPrimitive from '@radix-ui/react-dialog';
|
|
5
6
|
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
@@ -230,4 +231,47 @@ interface TerminalInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputE
|
|
|
230
231
|
}
|
|
231
232
|
declare const TerminalInput: React$1.ForwardRefExoticComponent<TerminalInputProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
232
233
|
|
|
233
|
-
|
|
234
|
+
interface DropZoneProps {
|
|
235
|
+
/** Called with dropped files */
|
|
236
|
+
onDrop: (files: File[]) => void;
|
|
237
|
+
/** Accepted file types (e.g. ".pdf,.csv,.xlsx") */
|
|
238
|
+
accept?: string;
|
|
239
|
+
/** Whether drop zone is active */
|
|
240
|
+
disabled?: boolean;
|
|
241
|
+
/** Custom overlay content (replaces default) */
|
|
242
|
+
overlay?: ReactNode;
|
|
243
|
+
/** Overlay title */
|
|
244
|
+
title?: string;
|
|
245
|
+
/** Overlay description */
|
|
246
|
+
description?: string;
|
|
247
|
+
/** Overlay icon (Material Symbols name or ReactNode) */
|
|
248
|
+
icon?: string | ReactNode;
|
|
249
|
+
/** Children wrapped by the drop zone */
|
|
250
|
+
children: ReactNode;
|
|
251
|
+
className?: string;
|
|
252
|
+
}
|
|
253
|
+
declare function DropZone({ onDrop, accept, disabled, overlay, title, description, icon, children, className, }: DropZoneProps): react_jsx_runtime.JSX.Element;
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* UploadProgress — file upload status indicators.
|
|
257
|
+
*
|
|
258
|
+
* Shows a list of files being uploaded with progress bars,
|
|
259
|
+
* completion checkmarks, and error states.
|
|
260
|
+
*/
|
|
261
|
+
interface UploadFile {
|
|
262
|
+
id: string;
|
|
263
|
+
name: string;
|
|
264
|
+
size: number;
|
|
265
|
+
status: "pending" | "uploading" | "complete" | "error";
|
|
266
|
+
progress?: number;
|
|
267
|
+
error?: string;
|
|
268
|
+
}
|
|
269
|
+
interface UploadProgressProps {
|
|
270
|
+
files: UploadFile[];
|
|
271
|
+
onRemove?: (id: string) => void;
|
|
272
|
+
onRetry?: (id: string) => void;
|
|
273
|
+
className?: string;
|
|
274
|
+
}
|
|
275
|
+
declare function UploadProgress({ files, onRemove, onRetry, className }: UploadProgressProps): react_jsx_runtime.JSX.Element | null;
|
|
276
|
+
|
|
277
|
+
export { Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropZone, type DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, Input, type InputProps, Label, Logo, type LogoProps, Progress, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Skeleton, SkeletonCard, SkeletonTable, StatCard, type StatCardProps, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, TangleKnot, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, Textarea, type TextareaProps, type Toast, ToastContainer, ToastProvider, type UploadFile, UploadProgress, type UploadProgressProps, badgeVariants, useToast };
|
package/dist/primitives.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
DropZone,
|
|
2
3
|
Label,
|
|
3
4
|
Select,
|
|
4
5
|
SelectContent,
|
|
@@ -18,8 +19,9 @@ import {
|
|
|
18
19
|
TerminalLine,
|
|
19
20
|
ToastContainer,
|
|
20
21
|
ToastProvider,
|
|
22
|
+
UploadProgress,
|
|
21
23
|
useToast
|
|
22
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-CSIXZEKN.js";
|
|
23
25
|
import {
|
|
24
26
|
Avatar,
|
|
25
27
|
AvatarFallback,
|
|
@@ -120,6 +122,7 @@ export {
|
|
|
120
122
|
DialogPortal,
|
|
121
123
|
DialogTitle,
|
|
122
124
|
DialogTrigger,
|
|
125
|
+
DropZone,
|
|
123
126
|
DropdownMenu,
|
|
124
127
|
DropdownMenuCheckboxItem,
|
|
125
128
|
DropdownMenuContent,
|
|
@@ -175,6 +178,7 @@ export {
|
|
|
175
178
|
Textarea,
|
|
176
179
|
ToastContainer,
|
|
177
180
|
ToastProvider,
|
|
181
|
+
UploadProgress,
|
|
178
182
|
badgeVariants,
|
|
179
183
|
buttonVariants,
|
|
180
184
|
useToast
|
package/dist/workspace.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
3
|
import { F as FileNode, g as FileTreeVisibilityOptions, b as FileTabData } from './file-tabs-CmaoDVBI.js';
|
|
4
4
|
export { A as ArtifactPane, a as ArtifactPaneProps } from './file-tabs-CmaoDVBI.js';
|
|
5
|
-
import { c as ChatContainerProps } from './chat-container-
|
|
5
|
+
import { c as ChatContainerProps } from './chat-container-B34uj-J1.js';
|
|
6
6
|
import { OpenUIComponentNode, OpenUIAction } from './openui.js';
|
|
7
7
|
import './parts-CyGkM6Fp.js';
|
|
8
8
|
import './branding-DCi5VEik.js';
|
package/dist/workspace.js
CHANGED
|
@@ -8,9 +8,9 @@ import {
|
|
|
8
8
|
StatusBar,
|
|
9
9
|
TerminalPanel,
|
|
10
10
|
WorkspaceLayout
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-ZSNOGOUX.js";
|
|
12
12
|
import "./chunk-MUOL44AE.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-PXRPYAMM.js";
|
|
14
14
|
import "./chunk-CNWVHQFY.js";
|
|
15
15
|
import "./chunk-WUR652Y3.js";
|
|
16
16
|
import "./chunk-HRMUF35V.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox-ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.7",
|
|
4
4
|
"description": "Unified UI component library for Tangle Sandbox — primitives, chat, dashboard, terminal, editor, and workspace components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|