@tangle-network/sandbox-ui 1.1.8 → 2.0.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 +1 -1
- package/dist/{AgentGraph-DxAeQQch.d.ts → AgentGraph-B4uWLXlD.d.ts} +12 -17
- package/dist/AgentGraph-C1DsA-Rd.js +1369 -0
- package/dist/{AgentGraphCanvas-CMdOlSlh.js → AgentGraphCanvas-Bcxq-e6E.js} +557 -383
- package/dist/{WorkflowGraph-DZ3xejKE.js → WorkflowGraph-BDjc7V_U.js} +3 -2
- package/dist/canvas-theme-DGd0fm1H.js +58 -0
- package/dist/{chat-4OZD23RA.js → chat-BrlLa4rg.js} +2 -2
- package/dist/chat.d.ts +2 -2
- package/dist/chat.js +1 -1
- package/dist/{dashboard-ClKA3opr.js → dashboard-FMrtIe9S.js} +3 -3
- package/dist/dashboard.js +1 -1
- package/dist/globals.css +2366 -1801
- package/dist/{index-ucJHuuVZ.d.ts → index-5zOVKgDT.d.ts} +2 -2
- package/dist/index-BK8KKLNY.d.ts +26 -0
- package/dist/{index-72uBu5lu.d.ts → index-D9-IiEpQ.d.ts} +21 -6
- package/dist/index.d.ts +5 -6
- package/dist/index.js +8 -291
- package/dist/integrations.d.ts +2 -1
- package/dist/integrations.js +6 -1
- package/dist/latest-events-B34ElSTE.js +190 -0
- package/dist/{AgentGraph-DJEQrKTs.js → node-ui-Bfnh08U3.js} +40 -1194
- package/dist/primitives-CCdx5Hh_.js +23 -0
- package/dist/primitives.d.ts +2 -3
- package/dist/primitives.js +1 -2
- package/dist/{run-Qern6muT.js → run-BqpdpP1K.js} +161 -60
- package/dist/run.d.ts +2 -2
- package/dist/run.js +3 -1
- package/dist/styles.css +2366 -1801
- package/dist/tailwind.css +74 -60
- package/dist/tokens.css +452 -851
- package/dist/{workbench-DOgYO3Zg.js → workbench-BVnZNhP2.js} +1 -1
- package/dist/workbench.js +1 -1
- package/dist/workflows.d.ts +3 -7
- package/dist/workflows.js +2 -1
- package/package.json +11 -10
- package/dist/elk-loader-Dl9S7jQk.js +0 -12
- package/dist/index-BAEvGqrn.d.ts +0 -26
- package/dist/primitives-CiwDp4-0.js +0 -32
- package/dist/rolldown-runtime-782esTHO.js +0 -26
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as fmtDuration, c as fmtTokens, i as fmtCost, r as clampPreview } from "./AgentGraph-C1DsA-Rd.js";
|
|
2
|
+
import { A as worstSeverity, E as isStructuralKind, O as triggerNodeIndex, P as shortModel, T as buildWorkflowGraph, _ as problemBorder, a as ProblemMessages, b as statusBorder, c as STATUS_COLOR, f as StatusFooter, g as kindAccent, h as emptySlotLabel, i as ProblemMarker, k as wfEdgeId, l as STATUS_LABEL, m as edgeColor, o as RESTING_BORDER, p as StatusPill, r as NodeMark, s as RESTING_SHADOW, v as problemSurface, x as COMPACT_NODE_SIZE, y as problemTitle } from "./node-ui-Bfnh08U3.js";
|
|
2
3
|
import { n as classifyOutput, t as NodeOutputBody } from "./node-output-DlySTwxr.js";
|
|
3
|
-
import {
|
|
4
|
+
import { i as loadElk, n as motionAllowed, r as useColorMode, t as SELECTION_OUTLINE } from "./canvas-theme-DGd0fm1H.js";
|
|
4
5
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
5
6
|
import { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
6
7
|
import { Expand, Maximize2, Minimize2, Plus, Shrink, X } from "lucide-react";
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { useLayoutEffect, useState } from "react";
|
|
2
|
+
// src/workflows/elk-loader.ts
|
|
3
|
+
/** One ELK instance per page. `null` once loading failed, so a host without
|
|
4
|
+
* the peer pays for one failed import, not one per render. */
|
|
5
|
+
let elkInstance;
|
|
6
|
+
function loadElk() {
|
|
7
|
+
elkInstance ??= import("elkjs/lib/elk.bundled.js").then((mod) => {
|
|
8
|
+
const Elk = mod.default;
|
|
9
|
+
return new Elk();
|
|
10
|
+
}).catch(() => null);
|
|
11
|
+
return elkInstance;
|
|
12
|
+
}
|
|
13
|
+
// src/workflows/canvas-theme.ts
|
|
14
|
+
/** Motion is opt-OUT, so it is only used where the reader's preference can be
|
|
15
|
+
* read and says nothing against it. Somewhere without `matchMedia` cannot say
|
|
16
|
+
* a reader tolerates movement, so it gets none. */
|
|
17
|
+
function motionAllowed() {
|
|
18
|
+
return typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === false;
|
|
19
|
+
}
|
|
20
|
+
/** React Flow adds its own .light/.dark class below the graph wrapper. Read
|
|
21
|
+
* that wrapper's inherited scheme so a nested WorkspaceLayout theme wins over
|
|
22
|
+
* the page root without React Flow's class influencing the answer. */
|
|
23
|
+
function currentColorMode(anchor) {
|
|
24
|
+
if (typeof document === "undefined" || typeof window === "undefined") return "light";
|
|
25
|
+
const scheme = window.getComputedStyle(anchor ?? document.documentElement).colorScheme;
|
|
26
|
+
if (scheme.startsWith("dark")) return "dark";
|
|
27
|
+
if (scheme.startsWith("light")) return "light";
|
|
28
|
+
return (anchor ?? document.documentElement).closest(".dark") ? "dark" : "light";
|
|
29
|
+
}
|
|
30
|
+
function useColorMode(wrapperRef, hasGraph) {
|
|
31
|
+
const [mode, setMode] = useState(() => currentColorMode(null));
|
|
32
|
+
useLayoutEffect(() => {
|
|
33
|
+
const anchor = hasGraph ? wrapperRef.current : null;
|
|
34
|
+
const update = () => setMode(currentColorMode(anchor));
|
|
35
|
+
update();
|
|
36
|
+
const observer = new MutationObserver(update);
|
|
37
|
+
for (let el = anchor ?? document.documentElement; el; el = el.parentElement) observer.observe(el, {
|
|
38
|
+
attributes: true,
|
|
39
|
+
attributeFilter: [
|
|
40
|
+
"class",
|
|
41
|
+
"data-theme",
|
|
42
|
+
"data-sandbox-theme",
|
|
43
|
+
"style"
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
return () => observer.disconnect();
|
|
47
|
+
}, [wrapperRef, hasGraph]);
|
|
48
|
+
return mode;
|
|
49
|
+
}
|
|
50
|
+
/** The selected node's ring. An `outline` rather than a border or a box-shadow
|
|
51
|
+
* because both of those are already spoken for — the border carries tone and
|
|
52
|
+
* run status, the shadow carries the running/waiting glow — and an outline
|
|
53
|
+
* composes with both without disturbing the laid-out box. */
|
|
54
|
+
const SELECTION_OUTLINE = {
|
|
55
|
+
outline: "2px solid hsl(var(--foreground) / .7)",
|
|
56
|
+
outlineOffset: 2
|
|
57
|
+
};
|
|
58
|
+
export { loadElk as i, motionAllowed as n, useColorMode as r, SELECTION_OUTLINE as t };
|
|
@@ -4,7 +4,7 @@ import * as React$1 from "react";
|
|
|
4
4
|
import { createPortal } from "react-dom";
|
|
5
5
|
import { Bot, Brain, Check, ChevronDown, Lock, Pencil, Plus, Send, Sparkles, Square, Trash2, X } from "lucide-react";
|
|
6
6
|
import { focusField, focusRing } from "@tangle-network/ui/utils";
|
|
7
|
-
import { AgentTimeline as AgentTimeline$1, ChatContainer as ChatContainer$1, ChatMessage, ChatMessage as ChatMessage$1, MessageAuthor, MessageList, TRANSCRIPT_TEXT, ThinkingIndicator, UserMessage, isViewerMessage } from "@tangle-network/ui/chat";
|
|
7
|
+
import { AgentTimeline as AgentTimeline$1, AgentTimelineColumn, AgentTimelineStep, ChatContainer as ChatContainer$1, ChatMessage, ChatMessage as ChatMessage$1, MessageAuthor, MessageList, SpeakerHeader, TRANSCRIPT_TEXT, ThinkingIndicator, UserMessage, agentTimelineStepKind, foldSummary, isViewerMessage, partitionBySpeaker } from "@tangle-network/ui/chat";
|
|
8
8
|
import { modelProvider, reasoningLadder, snapHarnessToModel } from "@tangle-network/agent-interface";
|
|
9
9
|
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
|
|
10
10
|
// src/chat/reasoning-level-picker.tsx
|
|
@@ -862,4 +862,4 @@ function ArtifactAgentDock({ scope, open, onOpenChange, transport, defaultPrompt
|
|
|
862
862
|
]
|
|
863
863
|
});
|
|
864
864
|
}
|
|
865
|
-
export {
|
|
865
|
+
export { ReasoningLevelPicker as S, modelProvider as _, ChatMessage$1 as a, DEFAULT_REASONING_LEVEL_OPTIONS as b, SpeakerHeader as c, UserMessage as d, agentTimelineStepKind as f, ArtifactAgentDock as g, partitionBySpeaker as h, ChatContainer$1 as i, TRANSCRIPT_TEXT as l, isViewerMessage as m, AgentTimelineColumn as n, MessageAuthor as o, foldSummary as p, AgentTimelineStep as r, MessageList as s, AgentTimeline$1 as t, ThinkingIndicator as u, snapHarnessToModel as v, HARNESS_REASONING_OPTIONS as x, AgentProfilePicker as y };
|
package/dist/chat.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as
|
|
2
|
-
export { type AgentProfileCapability, type AgentProfileDraft, type AgentProfileOption, AgentProfilePicker, type AgentProfilePickerProps, AgentTimeline, type AgentTimelineArtifactItem, type AgentTimelineCustomItem, type AgentTimelineItem, type AgentTimelineMessageItem, type AgentTimelineProps, type AgentTimelineStatusItem, type AgentTimelineTone, type AgentTimelineToolGroupItem, type AgentTimelineToolItem, ArtifactAgentDock, type ArtifactAgentDockProps, type ArtifactAgentDockTransport, type ArtifactDockMessage, type ArtifactDockStreamEvent, type ArtifactKind, type ArtifactScope, type ChatAuthor, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, DEFAULT_REASONING_LEVEL_OPTIONS, HARNESS_REASONING_OPTIONS, MessageAuthor, type MessageAuthorProps, MessageList, type MessageListProps, type MessageRole, type ReasoningLevel, type ReasoningLevelOption, ReasoningLevelPicker, type ReasoningLevelPickerProps, TRANSCRIPT_TEXT, ThinkingIndicator, type ThinkingIndicatorProps, UserMessage, type UserMessageProps, isViewerMessage, modelProvider, snapHarnessToModel };
|
|
1
|
+
import { $ as AgentProfilePicker, A as SpeakerSection, B as partitionBySpeaker, C as MessageList, D as SpeakerHeader, E as Speaker, F as UserMessage, G as ArtifactDockStreamEvent, H as ArtifactAgentDockProps, I as UserMessageProps, J as modelProvider, K as ArtifactKind, L as agentTimelineStepKind, M as TRANSCRIPT_TEXT, N as ThinkingIndicator, O as SpeakerHeaderProps, P as ThinkingIndicatorProps, Q as AgentProfileOption, R as foldSummary, S as MessageAuthorProps, T as MessageRole, U as ArtifactAgentDockTransport, V as ArtifactAgentDock, W as ArtifactDockMessage, X as AgentProfileCapability, Y as snapHarnessToModel, Z as AgentProfileDraft, _ as ChatContainer, a as AgentTimelineFoldItem, at as ReasoningLevelPicker, b as ChatMessageProps, c as AgentTimelineProps, d as AgentTimelineStepKind, et as AgentProfilePickerProps, f as AgentTimelineStepProps, g as ChatAuthor, h as AgentTimelineToolItem, i as AgentTimelineCustomItem, it as ReasoningLevelOption, j as SpeakerState, k as SpeakerPart, l as AgentTimelineStatusItem, m as AgentTimelineToolGroupItem, n as AgentTimelineArtifactItem, nt as HARNESS_REASONING_OPTIONS, o as AgentTimelineItem, ot as ReasoningLevelPickerProps, p as AgentTimelineTone, q as ArtifactScope, r as AgentTimelineColumn, rt as ReasoningLevel, s as AgentTimelineMessageItem, t as AgentTimeline, tt as DEFAULT_REASONING_LEVEL_OPTIONS, u as AgentTimelineStep, v as ChatContainerProps, w as MessageListProps, x as MessageAuthor, y as ChatMessage, z as isViewerMessage } from "./index-5zOVKgDT.js";
|
|
2
|
+
export { type AgentProfileCapability, type AgentProfileDraft, type AgentProfileOption, AgentProfilePicker, type AgentProfilePickerProps, AgentTimeline, type AgentTimelineArtifactItem, AgentTimelineColumn, type AgentTimelineCustomItem, type AgentTimelineFoldItem, type AgentTimelineItem, type AgentTimelineMessageItem, type AgentTimelineProps, type AgentTimelineStatusItem, AgentTimelineStep, type AgentTimelineStepKind, type AgentTimelineStepProps, type AgentTimelineTone, type AgentTimelineToolGroupItem, type AgentTimelineToolItem, ArtifactAgentDock, type ArtifactAgentDockProps, type ArtifactAgentDockTransport, type ArtifactDockMessage, type ArtifactDockStreamEvent, type ArtifactKind, type ArtifactScope, type ChatAuthor, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, DEFAULT_REASONING_LEVEL_OPTIONS, HARNESS_REASONING_OPTIONS, MessageAuthor, type MessageAuthorProps, MessageList, type MessageListProps, type MessageRole, type ReasoningLevel, type ReasoningLevelOption, ReasoningLevelPicker, type ReasoningLevelPickerProps, type Speaker, SpeakerHeader, type SpeakerHeaderProps, type SpeakerPart, type SpeakerSection, type SpeakerState, TRANSCRIPT_TEXT, ThinkingIndicator, type ThinkingIndicatorProps, UserMessage, type UserMessageProps, agentTimelineStepKind, foldSummary, isViewerMessage, modelProvider, partitionBySpeaker, snapHarnessToModel };
|
package/dist/chat.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { y as AgentProfilePicker, t as AgentTimeline, n as AgentTimelineColumn, r as AgentTimelineStep, g as ArtifactAgentDock, i as ChatContainer, a as ChatMessage, b as DEFAULT_REASONING_LEVEL_OPTIONS, x as HARNESS_REASONING_OPTIONS, o as MessageAuthor, s as MessageList, S as ReasoningLevelPicker, c as SpeakerHeader, l as TRANSCRIPT_TEXT, u as ThinkingIndicator, d as UserMessage, f as agentTimelineStepKind, p as foldSummary, m as isViewerMessage, _ as modelProvider, h as partitionBySpeaker, v as snapHarnessToModel } from "./chat-BrlLa4rg.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as Button$1, zr as Logo } from "./primitives-CCdx5Hh_.js";
|
|
2
2
|
import { t as cn$1 } from "./utils-BER_bdgE.js";
|
|
3
3
|
import { r as ShellHeader } from "./shell-header-CwqDzC4I.js";
|
|
4
4
|
import { n as MOTION_SURFACE, t as MOTION_CONTROL } from "./motion-Bn7ESHrj.js";
|
|
@@ -1175,11 +1175,11 @@ function OutOfCreditsModal({ balance, onClose, ctaLabel = "Add credits", classNa
|
|
|
1175
1175
|
}),
|
|
1176
1176
|
/* @__PURE__ */ jsxs("div", {
|
|
1177
1177
|
className: "flex gap-2 justify-end",
|
|
1178
|
-
children: [onClose && /* @__PURE__ */ jsx(
|
|
1178
|
+
children: [onClose && /* @__PURE__ */ jsx(Button$1, {
|
|
1179
1179
|
variant: "outline",
|
|
1180
1180
|
onClick: onClose,
|
|
1181
1181
|
children: "Not now"
|
|
1182
|
-
}), /* @__PURE__ */ jsx(
|
|
1182
|
+
}), /* @__PURE__ */ jsx(Button$1, {
|
|
1183
1183
|
asChild: true,
|
|
1184
1184
|
children: /* @__PURE__ */ jsx("a", {
|
|
1185
1185
|
href: balance.manageUrl,
|
package/dist/dashboard.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as useSidebar, A as parseInsufficientBalance, B as SidebarPanel, C as SandboxStatusPill, D as ResourceMeter, E as ResourceSnapshot, F as RailHeader, G as SidebarRailNav, H as SidebarPanelHeader, I as RailModeButton, J as SIDEBAR_PANEL_WIDTH, K as RailTooltip, L as RailSeparator, M as RailButton, N as RailExpandable, O as INSUFFICIENT_BALANCE_CODE, P as RailFlyout, Q as SidebarProvider, R as Sidebar, S as SANDBOX_STATUS, T as ActivityFeed, U as SidebarRail, V as SidebarPanelContent, W as SidebarRailFooter, X as SIDEBAR_RAIL_WIDTH, Y as SIDEBAR_RAIL_LABELED_WIDTH, Z as SIDEBAR_TOTAL_WIDTH, _ as BackendSelector, a as PortsList, b as SandboxCard, c as SystemLogsViewer, d as DashboardLayout, f as HARNESS_OPTIONS, g as HarnessLogo, h as HARNESS_BRAND, i as TemplateCard, j as ProfileAvatar, k as OutOfCreditsModal, l as MetricAreaChart, m as chatCapableHarnesses, n as SnapshotList, o as GitPanel, p as HarnessPicker, q as SIDEBAR_MOBILE_WIDTH, r as ProcessList, s as UsageSummary, t as PromoBanner, u as SidebarLayout, v as SandboxTable, w as sandboxStatus, x as canAdminSandbox, y as NewSandboxCard, z as SidebarContent } from "./dashboard-
|
|
1
|
+
import { $ as useSidebar, A as parseInsufficientBalance, B as SidebarPanel, C as SandboxStatusPill, D as ResourceMeter, E as ResourceSnapshot, F as RailHeader, G as SidebarRailNav, H as SidebarPanelHeader, I as RailModeButton, J as SIDEBAR_PANEL_WIDTH, K as RailTooltip, L as RailSeparator, M as RailButton, N as RailExpandable, O as INSUFFICIENT_BALANCE_CODE, P as RailFlyout, Q as SidebarProvider, R as Sidebar, S as SANDBOX_STATUS, T as ActivityFeed, U as SidebarRail, V as SidebarPanelContent, W as SidebarRailFooter, X as SIDEBAR_RAIL_WIDTH, Y as SIDEBAR_RAIL_LABELED_WIDTH, Z as SIDEBAR_TOTAL_WIDTH, _ as BackendSelector, a as PortsList, b as SandboxCard, c as SystemLogsViewer, d as DashboardLayout, f as HARNESS_OPTIONS, g as HarnessLogo, h as HARNESS_BRAND, i as TemplateCard, j as ProfileAvatar, k as OutOfCreditsModal, l as MetricAreaChart, m as chatCapableHarnesses, n as SnapshotList, o as GitPanel, p as HarnessPicker, q as SIDEBAR_MOBILE_WIDTH, r as ProcessList, s as UsageSummary, t as PromoBanner, u as SidebarLayout, v as SandboxTable, w as sandboxStatus, x as canAdminSandbox, y as NewSandboxCard, z as SidebarContent } from "./dashboard-FMrtIe9S.js";
|
|
2
2
|
import { i as modelBrandFor, n as ProviderMark, r as canonicalModelId, t as ModelBrandStack } from "./model-brand-bTcMjQtB.js";
|
|
3
3
|
import { a as formatPrice, i as PricingPage, n as SandboxPageShell, o as BillingDashboard, r as UsageChart, t as DashboardPageHeader } from "./page-layout-CuOpvZys.js";
|
|
4
4
|
export { ActivityFeed, BackendSelector, BillingDashboard, DashboardLayout, DashboardPageHeader, GitPanel, HARNESS_BRAND, HARNESS_OPTIONS, HarnessLogo, HarnessPicker, INSUFFICIENT_BALANCE_CODE, MetricAreaChart, ModelBrandStack, NewSandboxCard, OutOfCreditsModal, PortsList, PricingPage, ProcessList, ProfileAvatar, PromoBanner, ProviderMark, RailButton, RailExpandable, RailFlyout, RailHeader, RailModeButton, RailSeparator, RailTooltip, ResourceMeter, ResourceSnapshot, SANDBOX_STATUS, SIDEBAR_MOBILE_WIDTH, SIDEBAR_PANEL_WIDTH, SIDEBAR_RAIL_LABELED_WIDTH, SIDEBAR_RAIL_WIDTH, SIDEBAR_TOTAL_WIDTH, SandboxCard, SandboxPageShell, SandboxStatusPill, SandboxTable, Sidebar, SidebarContent, SidebarLayout, SidebarPanel, SidebarPanelContent, SidebarPanelHeader, SidebarProvider, SidebarRail, SidebarRailFooter, SidebarRailNav, SnapshotList, SystemLogsViewer, TemplateCard, UsageChart, UsageSummary, canAdminSandbox, canonicalModelId, chatCapableHarnesses, formatPrice, modelBrandFor, parseInsufficientBalance, sandboxStatus, useSidebar };
|