@tangle-network/sandbox-ui 0.116.5 → 0.116.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/README.md +11 -0
- package/dist/{dashboard-Bx27mUVe.js → dashboard-_-b7laAR.js} +2 -2
- package/dist/dashboard.js +1 -1
- package/dist/globals.css +12 -0
- package/dist/index.js +2 -2
- package/dist/integrations.d.ts +12 -2
- package/dist/integrations.js +38 -5
- package/dist/styles.css +12 -0
- package/dist/{workbench-BbeBgtUT.js → workbench-DknSt1S8.js} +1 -1
- package/dist/workbench.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -38,6 +38,17 @@ Import styles in your app root:
|
|
|
38
38
|
import "@tangle-network/sandbox-ui/styles";
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
### Workspace integration access
|
|
42
|
+
|
|
43
|
+
Use `IntegrationsPanel` from `/integrations` for the provider catalog, logos, search, connection status, and account actions.
|
|
44
|
+
Do not render a second connection catalog above it.
|
|
45
|
+
Supply `getConnectionContext` for a short access label on each connected card.
|
|
46
|
+
Supply `getConnectionActions` for authorized workspace actions in that card's menu.
|
|
47
|
+
Each action has an `id`, `label`, optional `disabled` flag, and `onSelect` callback.
|
|
48
|
+
The panel waits for asynchronous actions and surfaces failures.
|
|
49
|
+
Keep workspace authorization and binding persistence in the consuming application's server.
|
|
50
|
+
When a provider has multiple accounts, include distinct account labels and identities in its workspace actions.
|
|
51
|
+
|
|
41
52
|
### Embed a sandbox app
|
|
42
53
|
|
|
43
54
|
Use `EmbeddedAppView` when a workspace presents a running web app beside an agent conversation.
|
|
@@ -2389,9 +2389,9 @@ function BackendSelector({ backends, selected, onChange, variant = "pill", label
|
|
|
2389
2389
|
children: [trigger, /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Content, {
|
|
2390
2390
|
position: "popper",
|
|
2391
2391
|
sideOffset: 4,
|
|
2392
|
-
className: cn$1("z-50 overflow-hidden", variant === "pill" ? "min-w-[240px] max-w-[320px]" : "w-[var(--radix-select-trigger-width)]", "rounded-[var(--radius-md)] border border-[var(--md3-outline-variant)]", "bg-surface-container-highest shadow-[0_8px_30px_rgba(0,0,0,0.45)] ring-1 ring-[#ffffff14]", "data-[state=open]:animate-in data-[state=closed]:animate-out", "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-1"),
|
|
2392
|
+
className: cn$1("z-50 max-h-[var(--radix-select-content-available-height)] overflow-hidden", variant === "pill" ? "min-w-[240px] max-w-[320px]" : "w-[var(--radix-select-trigger-width)]", "rounded-[var(--radius-md)] border border-[var(--md3-outline-variant)]", "bg-surface-container-highest shadow-[0_8px_30px_rgba(0,0,0,0.45)] ring-1 ring-[#ffffff14]", "data-[state=open]:animate-in data-[state=closed]:animate-out", "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-1"),
|
|
2393
2393
|
children: /* @__PURE__ */ jsx(Select.Viewport, {
|
|
2394
|
-
className: "p-1",
|
|
2394
|
+
className: "max-h-[min(24rem,calc(var(--radix-select-content-available-height)-2px))] overflow-y-auto overscroll-contain p-1",
|
|
2395
2395
|
children: backends.map((backend) => /* @__PURE__ */ jsxs(Select.Item, {
|
|
2396
2396
|
value: backend.type,
|
|
2397
2397
|
className: cn$1("relative flex cursor-pointer select-none items-start gap-2.5 rounded-[var(--radius-sm)]", "px-3 py-2 text-sm outline-none", "transition-colors duration-[var(--transition-fast)]", "hover:bg-accent/50 focus:bg-accent/50", "data-[state=checked]:bg-[var(--accent-surface-soft)] data-[state=checked]:text-[var(--brand-primary)]"),
|
package/dist/dashboard.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as SidebarRailNav, A as ResourceMeter, B as RailFlyout, C as InvoiceTable, D as canAdminSandbox, E as SandboxCard, F as CreditBalance, G as Sidebar, H as RailModeButton, I as ProfileAvatar, J as SidebarPanelContent, K as SidebarContent, L as RailButton, M as INSUFFICIENT_BALANCE_CODE, N as OutOfCreditsModal, O as ActivityFeed, P as parseInsufficientBalance, Q as SidebarRailHeader, R as RailCollapseToggle, S as PlanCards, T as NewSandboxCard, U as RailSeparator, V as RailHeader, W as RailThemeToggle, X as SidebarRail, Y as SidebarPanelHeader, Z as SidebarRailFooter, _ as HarnessPicker, a as ProcessList, at as SIDEBAR_TOTAL_WIDTH, b as HarnessLogo, c as UsageSummary, d as MetricAreaChart, et as RailTooltip, f as ProfileComparison, g as HARNESS_OPTIONS, h as DashboardLayout, i as NetworkConfig, it as SIDEBAR_RAIL_WIDTH, j as ClusterStatusBar, k as ResourceSnapshot, l as SystemLogsViewer, m as SidebarLayout, n as SnapshotList, nt as SIDEBAR_PANEL_WIDTH, o as PortsList, ot as SidebarProvider, p as ProfileSelector, q as SidebarPanel, r as BackendConfig, rt as SIDEBAR_RAIL_LABELED_WIDTH, s as GitPanel, st as useSidebar, t as PromoBanner, tt as SIDEBAR_MOBILE_WIDTH, u as VariantList, v as chatCapableHarnesses, w as SandboxTable, x as BackendSelector, y as HARNESS_BRAND, z as RailExpandable } from "./dashboard-
|
|
1
|
+
import { $ as SidebarRailNav, A as ResourceMeter, B as RailFlyout, C as InvoiceTable, D as canAdminSandbox, E as SandboxCard, F as CreditBalance, G as Sidebar, H as RailModeButton, I as ProfileAvatar, J as SidebarPanelContent, K as SidebarContent, L as RailButton, M as INSUFFICIENT_BALANCE_CODE, N as OutOfCreditsModal, O as ActivityFeed, P as parseInsufficientBalance, Q as SidebarRailHeader, R as RailCollapseToggle, S as PlanCards, T as NewSandboxCard, U as RailSeparator, V as RailHeader, W as RailThemeToggle, X as SidebarRail, Y as SidebarPanelHeader, Z as SidebarRailFooter, _ as HarnessPicker, a as ProcessList, at as SIDEBAR_TOTAL_WIDTH, b as HarnessLogo, c as UsageSummary, d as MetricAreaChart, et as RailTooltip, f as ProfileComparison, g as HARNESS_OPTIONS, h as DashboardLayout, i as NetworkConfig, it as SIDEBAR_RAIL_WIDTH, j as ClusterStatusBar, k as ResourceSnapshot, l as SystemLogsViewer, m as SidebarLayout, n as SnapshotList, nt as SIDEBAR_PANEL_WIDTH, o as PortsList, ot as SidebarProvider, p as ProfileSelector, q as SidebarPanel, r as BackendConfig, rt as SIDEBAR_RAIL_LABELED_WIDTH, s as GitPanel, st as useSidebar, t as PromoBanner, tt as SIDEBAR_MOBILE_WIDTH, u as VariantList, v as chatCapableHarnesses, w as SandboxTable, x as BackendSelector, y as HARNESS_BRAND, z as RailExpandable } from "./dashboard-_-b7laAR.js";
|
|
2
2
|
import { n as canonicalModelId, r as modelBrandFor, t as ModelBrandStack } from "./model-brand-hMyDTUqB.js";
|
|
3
3
|
import { a as formatPrice, i as PricingPage, n as TemplateCard, o as BillingDashboard, r as UsageChart, t as InfoPanel } from "./info-panel-C9cqDzOL.js";
|
|
4
4
|
export { ActivityFeed, BackendConfig, BackendSelector, BillingDashboard, ClusterStatusBar, CreditBalance, DashboardLayout, GitPanel, HARNESS_BRAND, HARNESS_OPTIONS, HarnessLogo, HarnessPicker, INSUFFICIENT_BALANCE_CODE, InfoPanel, InvoiceTable, MetricAreaChart, ModelBrandStack, NetworkConfig, NewSandboxCard, OutOfCreditsModal, PlanCards, PortsList, PricingPage, ProcessList, ProfileAvatar, ProfileComparison, ProfileSelector, PromoBanner, RailButton, RailCollapseToggle, RailExpandable, RailFlyout, RailHeader, RailModeButton, RailSeparator, RailThemeToggle, RailTooltip, ResourceMeter, ResourceSnapshot, SIDEBAR_MOBILE_WIDTH, SIDEBAR_PANEL_WIDTH, SIDEBAR_RAIL_LABELED_WIDTH, SIDEBAR_RAIL_WIDTH, SIDEBAR_TOTAL_WIDTH, SandboxCard, SandboxTable, Sidebar, SidebarContent, SidebarLayout, SidebarPanel, SidebarPanelContent, SidebarPanelHeader, SidebarProvider, SidebarRail, SidebarRailFooter, SidebarRailHeader, SidebarRailNav, SnapshotList, SystemLogsViewer, TemplateCard, UsageChart, UsageSummary, VariantList, canAdminSandbox, canonicalModelId, chatCapableHarnesses, formatPrice, modelBrandFor, parseInsufficientBalance, useSidebar };
|
package/dist/globals.css
CHANGED
|
@@ -971,6 +971,9 @@
|
|
|
971
971
|
.max-h-\[90vh\] {
|
|
972
972
|
max-height: 90vh;
|
|
973
973
|
}
|
|
974
|
+
.max-h-\[min\(24rem\,calc\(var\(--radix-select-content-available-height\)-2px\)\)\] {
|
|
975
|
+
max-height: min(24rem, calc(var(--radix-select-content-available-height) - 2px));
|
|
976
|
+
}
|
|
974
977
|
.max-h-\[min\(60vh\,35rem\)\] {
|
|
975
978
|
max-height: min(60vh, 35rem);
|
|
976
979
|
}
|
|
@@ -980,6 +983,9 @@
|
|
|
980
983
|
.max-h-\[var\(--radix-dropdown-menu-content-available-height\)\] {
|
|
981
984
|
max-height: var(--radix-dropdown-menu-content-available-height);
|
|
982
985
|
}
|
|
986
|
+
.max-h-\[var\(--radix-select-content-available-height\)\] {
|
|
987
|
+
max-height: var(--radix-select-content-available-height);
|
|
988
|
+
}
|
|
983
989
|
.max-h-full {
|
|
984
990
|
max-height: 100%;
|
|
985
991
|
}
|
|
@@ -1043,6 +1049,9 @@
|
|
|
1043
1049
|
.min-h-\[120px\] {
|
|
1044
1050
|
min-height: 120px;
|
|
1045
1051
|
}
|
|
1052
|
+
.min-h-\[136px\] {
|
|
1053
|
+
min-height: 136px;
|
|
1054
|
+
}
|
|
1046
1055
|
.min-h-\[160px\] {
|
|
1047
1056
|
min-height: 160px;
|
|
1048
1057
|
}
|
|
@@ -1942,6 +1951,9 @@
|
|
|
1942
1951
|
.overflow-y-auto {
|
|
1943
1952
|
overflow-y: auto;
|
|
1944
1953
|
}
|
|
1954
|
+
.overscroll-contain {
|
|
1955
|
+
overscroll-behavior: contain;
|
|
1956
|
+
}
|
|
1945
1957
|
.\!rounded-full {
|
|
1946
1958
|
border-radius: calc(infinity * 1px) !important;
|
|
1947
1959
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { a as computeDiffStats, c as BRAND_PRISM_THEME, d as DiffStatsBadge, f as GitStatusBadge, i as buildUnifiedPatch, l as CodeSurface, m as PillTabs, n as SandboxArtifactPane, o as CodeView, p as PanelHeader, r as DiffView, s as FileBreadcrumb, t as ChangesPane, u as resolveLanguage } from "./workbench-
|
|
1
|
+
import { a as computeDiffStats, c as BRAND_PRISM_THEME, d as DiffStatsBadge, f as GitStatusBadge, i as buildUnifiedPatch, l as CodeSurface, m as PillTabs, n as SandboxArtifactPane, o as CodeView, p as PanelHeader, r as DiffView, s as FileBreadcrumb, t as ChangesPane, u as resolveLanguage } from "./workbench-DknSt1S8.js";
|
|
2
2
|
import { $ as SelectItem, A as DropdownMenuItem, At as Textarea, B as DropdownMenuTrigger, C as DialogTitle, Ct as TabsList, D as DropdownMenuCheckboxItem, E as DropdownMenu, Et as TerminalDisplay, F as DropdownMenuSeparator, Ft as UploadProgress, G as Label, Gt as TangleKnot, H as FilterField, I as DropdownMenuShortcut, It as badgeVariants, J as Progress, K as Metric, L as DropdownMenuSub, Lt as buttonVariants, M as DropdownMenuPortal, Mt as ToastContainer, N as DropdownMenuRadioGroup, Nt as ToastProvider, O as DropdownMenuContent, P as DropdownMenuRadioItem, Pt as Toolbar, Q as SelectGroup, R as DropdownMenuSubContent, Rt as useTheme, S as DialogPortal, St as TabsContent, T as DropZone, U as InlineCode, V as EmptyState, W as Input, Wt as Logo, X as Select, Y as SegmentedControl, Z as SelectContent, _ as DialogContent, _t as TableFooter, a as Badge, at as SelectValue, b as DialogHeader, bt as TableRow, c as CardContent, ct as SkeletonCard, d as CardHeader, dt as StatusPill, et as SelectLabel, f as CardTitle, ft as Switch, g as DialogClose, gt as TableCell, h as Dialog, ht as TableCaption, i as AvatarImage, it as SelectTrigger, j as DropdownMenuLabel, jt as ThemeToggle, k as DropdownMenuGroup, kt as TextShimmer, l as CardDescription, lt as SkeletonTable, m as CopyButton, mt as TableBody, n as Avatar, nt as SelectScrollUpButton, o as Button, ot as SidebarDropZone, p as CodeBlock, pt as Table, q as MetricStrip, r as AvatarFallback, rt as SelectSeparator, s as Card, st as Skeleton, tt as SelectScrollDownButton, u as CardFooter, ut as StatCard, v as DialogDescription, vt as TableHead, w as DialogTrigger, wt as TabsTrigger, x as DialogOverlay, xt as Tabs, y as DialogFooter, yt as TableHeader, z as DropdownMenuSubTrigger, zt as useToast } from "./primitives-Dh1vG6J3.js";
|
|
3
3
|
import { t as WorkspacePaneHeader } from "./workspace-pane-header-Bg1cCcHX.js";
|
|
4
4
|
import { _ as TerminalPanel, a as AuditResults, b as DirectoryPane, c as SessionActivityMonitor, d as SessionSidebar, f as SESSION_CREATED_EVENT, g as RuntimePane, h as formatRelativeAge, i as TaskBoard, l as createShellShouldRevalidate, m as useOptimisticSessionItems, n as ApprovalQueue, o as AgentWorkbench, p as dispatchSessionCreated, r as CalendarView, s as SandboxWorkbench, t as ArtifactPane, u as shellShouldRevalidate, v as StatusBar, x as WorkspaceLayout, y as StatusBanner } from "./workspace-Pq-koOTW.js";
|
|
5
|
-
import { $ as SidebarRailNav, A as ResourceMeter, B as RailFlyout, C as InvoiceTable, D as canAdminSandbox, E as SandboxCard, F as CreditBalance, G as Sidebar, H as RailModeButton, I as ProfileAvatar, J as SidebarPanelContent, K as SidebarContent, L as RailButton, M as INSUFFICIENT_BALANCE_CODE, N as OutOfCreditsModal, O as ActivityFeed, P as parseInsufficientBalance, Q as SidebarRailHeader, R as RailCollapseToggle, S as PlanCards, T as NewSandboxCard, U as RailSeparator, V as RailHeader, W as RailThemeToggle, X as SidebarRail, Y as SidebarPanelHeader, Z as SidebarRailFooter, _ as HarnessPicker, a as ProcessList, at as SIDEBAR_TOTAL_WIDTH, b as HarnessLogo, c as UsageSummary, d as MetricAreaChart, et as RailTooltip, f as ProfileComparison, g as HARNESS_OPTIONS, h as DashboardLayout, i as NetworkConfig, it as SIDEBAR_RAIL_WIDTH, j as ClusterStatusBar, k as ResourceSnapshot, l as SystemLogsViewer, m as SidebarLayout, n as SnapshotList, nt as SIDEBAR_PANEL_WIDTH, o as PortsList, ot as SidebarProvider, p as ProfileSelector, q as SidebarPanel, r as BackendConfig, rt as SIDEBAR_RAIL_LABELED_WIDTH, s as GitPanel, st as useSidebar, t as PromoBanner, tt as SIDEBAR_MOBILE_WIDTH, u as VariantList, v as chatCapableHarnesses, w as SandboxTable, x as BackendSelector, y as HARNESS_BRAND, z as RailExpandable } from "./dashboard-
|
|
5
|
+
import { $ as SidebarRailNav, A as ResourceMeter, B as RailFlyout, C as InvoiceTable, D as canAdminSandbox, E as SandboxCard, F as CreditBalance, G as Sidebar, H as RailModeButton, I as ProfileAvatar, J as SidebarPanelContent, K as SidebarContent, L as RailButton, M as INSUFFICIENT_BALANCE_CODE, N as OutOfCreditsModal, O as ActivityFeed, P as parseInsufficientBalance, Q as SidebarRailHeader, R as RailCollapseToggle, S as PlanCards, T as NewSandboxCard, U as RailSeparator, V as RailHeader, W as RailThemeToggle, X as SidebarRail, Y as SidebarPanelHeader, Z as SidebarRailFooter, _ as HarnessPicker, a as ProcessList, at as SIDEBAR_TOTAL_WIDTH, b as HarnessLogo, c as UsageSummary, d as MetricAreaChart, et as RailTooltip, f as ProfileComparison, g as HARNESS_OPTIONS, h as DashboardLayout, i as NetworkConfig, it as SIDEBAR_RAIL_WIDTH, j as ClusterStatusBar, k as ResourceSnapshot, l as SystemLogsViewer, m as SidebarLayout, n as SnapshotList, nt as SIDEBAR_PANEL_WIDTH, o as PortsList, ot as SidebarProvider, p as ProfileSelector, q as SidebarPanel, r as BackendConfig, rt as SIDEBAR_RAIL_LABELED_WIDTH, s as GitPanel, st as useSidebar, t as PromoBanner, tt as SIDEBAR_MOBILE_WIDTH, u as VariantList, v as chatCapableHarnesses, w as SandboxTable, x as BackendSelector, y as HARNESS_BRAND, z as RailExpandable } from "./dashboard-_-b7laAR.js";
|
|
6
6
|
import { n as canonicalModelId, r as modelBrandFor, t as ModelBrandStack } from "./model-brand-hMyDTUqB.js";
|
|
7
7
|
import { a as formatPrice, i as PricingPage, n as TemplateCard, o as BillingDashboard, r as UsageChart, t as InfoPanel } from "./info-panel-C9cqDzOL.js";
|
|
8
8
|
import { t as usePtySession } from "./use-pty-session-Bf4hBLXJ.js";
|
package/dist/integrations.d.ts
CHANGED
|
@@ -47,6 +47,12 @@ interface IntegrationHealth {
|
|
|
47
47
|
//#endregion
|
|
48
48
|
//#region src/integrations/integrations-panel.d.ts
|
|
49
49
|
type IntegrationSort = "featured" | "alpha";
|
|
50
|
+
interface IntegrationConnectionAction {
|
|
51
|
+
id: string;
|
|
52
|
+
label: string;
|
|
53
|
+
disabled?: boolean;
|
|
54
|
+
onSelect: () => void | Promise<void>;
|
|
55
|
+
}
|
|
50
56
|
interface IntegrationsPanelProps {
|
|
51
57
|
catalog: IntegrationProvider[];
|
|
52
58
|
connections: IntegrationConnection[];
|
|
@@ -86,6 +92,10 @@ interface IntegrationsPanelProps {
|
|
|
86
92
|
connectionId: string;
|
|
87
93
|
providerId: string;
|
|
88
94
|
}) => void | Promise<void>;
|
|
95
|
+
/** Consumer-owned access context shown below the connected account. */
|
|
96
|
+
getConnectionContext?: (connection: IntegrationConnection) => string | undefined;
|
|
97
|
+
/** Additional authorized actions in the connected card menu. */
|
|
98
|
+
getConnectionActions?: (connection: IntegrationConnection) => IntegrationConnectionAction[];
|
|
89
99
|
/** Empty-state message when the catalog hasn't loaded any providers. */
|
|
90
100
|
emptyCatalogLabel?: string;
|
|
91
101
|
/**
|
|
@@ -104,7 +114,7 @@ interface IntegrationsPanelProps {
|
|
|
104
114
|
skeletonCount?: number;
|
|
105
115
|
className?: string;
|
|
106
116
|
}
|
|
107
|
-
export declare function IntegrationsPanel({ catalog, connections, healthByConnectionId, isLoading, error, onConnect, onDisconnect, getManageHref, onManage, emptyCatalogLabel, featuredIds, defaultSort, skeletonCount, className }: IntegrationsPanelProps): React$1.JSX.Element;
|
|
117
|
+
export declare function IntegrationsPanel({ catalog, connections, healthByConnectionId, isLoading, error, onConnect, onDisconnect, getManageHref, onManage, getConnectionContext, getConnectionActions, emptyCatalogLabel, featuredIds, defaultSort, skeletonCount, className }: IntegrationsPanelProps): React$1.JSX.Element;
|
|
108
118
|
//#endregion
|
|
109
119
|
//#region src/integrations/use-integrations.d.ts
|
|
110
120
|
/**
|
|
@@ -188,4 +198,4 @@ interface ProviderIconProps {
|
|
|
188
198
|
*/
|
|
189
199
|
export declare function ProviderIcon({ id, iconUrl, displayName, size, className }: ProviderIconProps): React$1.JSX.Element;
|
|
190
200
|
//#endregion
|
|
191
|
-
export type { ConnectInput, IntegrationConnection, IntegrationConnector, IntegrationHealth, IntegrationProvider, IntegrationSort, IntegrationsPanelProps, ProviderIconProps, UseIntegrationsOptions, UseIntegrationsResult };
|
|
201
|
+
export type { ConnectInput, IntegrationConnection, IntegrationConnectionAction, IntegrationConnector, IntegrationHealth, IntegrationProvider, IntegrationSort, IntegrationsPanelProps, ProviderIconProps, UseIntegrationsOptions, UseIntegrationsResult };
|
package/dist/integrations.js
CHANGED
|
@@ -118,7 +118,21 @@ function displayNameOf(provider) {
|
|
|
118
118
|
function matchesQuery(provider, q) {
|
|
119
119
|
return `${displayNameOf(provider)} ${provider.providerId} ${provider.description ?? ""}`.toLowerCase().includes(q);
|
|
120
120
|
}
|
|
121
|
-
function IntegrationsPanel({ catalog, connections, healthByConnectionId, isLoading, error, onConnect, onDisconnect, getManageHref, onManage, emptyCatalogLabel = "No integrations available yet.", featuredIds = DEFAULT_FEATURED_IDS, defaultSort = "featured", skeletonCount = DEFAULT_SKELETON_COUNT, className }) {
|
|
121
|
+
function IntegrationsPanel({ catalog, connections, healthByConnectionId, isLoading, error, onConnect, onDisconnect, getManageHref, onManage, getConnectionContext, getConnectionActions, emptyCatalogLabel = "No integrations available yet.", featuredIds = DEFAULT_FEATURED_IDS, defaultSort = "featured", skeletonCount = DEFAULT_SKELETON_COUNT, className }) {
|
|
122
|
+
const tileBoxClass = cn(TILE_BOX_CLASS, getConnectionContext && "w-full min-h-[136px]");
|
|
123
|
+
const [actionError, setActionError] = React$1.useState(null);
|
|
124
|
+
const [pendingAction, setPendingAction] = React$1.useState(false);
|
|
125
|
+
const runConnectionAction = async (action) => {
|
|
126
|
+
setActionError(null);
|
|
127
|
+
setPendingAction(true);
|
|
128
|
+
try {
|
|
129
|
+
await action.onSelect();
|
|
130
|
+
} catch (error) {
|
|
131
|
+
setActionError(error instanceof Error ? error.message : "Could not update the connection.");
|
|
132
|
+
} finally {
|
|
133
|
+
setPendingAction(false);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
122
136
|
const [query, setQuery] = React$1.useState("");
|
|
123
137
|
const [sort, setSort] = React$1.useState(defaultSort);
|
|
124
138
|
const [disconnectTarget, setDisconnectTarget] = React$1.useState(null);
|
|
@@ -213,7 +227,7 @@ function IntegrationsPanel({ catalog, connections, healthByConnectionId, isLoadi
|
|
|
213
227
|
className: TILE_GRID_CLASS,
|
|
214
228
|
children: Array.from({ length: skeletonCount }).map((_, i) => /* @__PURE__ */ jsxs("div", {
|
|
215
229
|
"aria-hidden": true,
|
|
216
|
-
className: cn(
|
|
230
|
+
className: cn(tileBoxClass, "animate-pulse border-border bg-muted/40"),
|
|
217
231
|
children: [/* @__PURE__ */ jsx("div", {
|
|
218
232
|
className: "shrink-0 rounded-2xl bg-muted",
|
|
219
233
|
style: {
|
|
@@ -243,6 +257,11 @@ function IntegrationsPanel({ catalog, connections, healthByConnectionId, isLoadi
|
|
|
243
257
|
sort,
|
|
244
258
|
onSortChange: setSort
|
|
245
259
|
}),
|
|
260
|
+
actionError ? /* @__PURE__ */ jsx("p", {
|
|
261
|
+
role: "alert",
|
|
262
|
+
className: "text-sm text-destructive",
|
|
263
|
+
children: actionError
|
|
264
|
+
}) : null,
|
|
246
265
|
connectError ? /* @__PURE__ */ jsx("div", {
|
|
247
266
|
role: "alert",
|
|
248
267
|
"data-testid": "integration-connect-error",
|
|
@@ -259,13 +278,15 @@ function IntegrationsPanel({ catalog, connections, healthByConnectionId, isLoadi
|
|
|
259
278
|
const live = connectionIndex.get(`${provider.providerId}:${connectorId}`);
|
|
260
279
|
const name = displayNameOf(provider);
|
|
261
280
|
if (Boolean(live) && live) {
|
|
281
|
+
const connectionContext = getConnectionContext?.(live);
|
|
282
|
+
const connectionActions = getConnectionActions?.(live) ?? [];
|
|
262
283
|
const manageHref = getManageHref?.(live);
|
|
263
284
|
const canManage = Boolean(manageHref) || Boolean(onManage);
|
|
264
285
|
return /* @__PURE__ */ jsxs("div", {
|
|
265
286
|
"data-testid": `integration-${provider.providerId}`,
|
|
266
287
|
"data-connected": "true",
|
|
267
288
|
title: live.accountDisplay ? `${name} — ${live.accountDisplay}` : name,
|
|
268
|
-
className: cn(
|
|
289
|
+
className: cn(tileBoxClass, "group relative", "border-[var(--surface-success-border)] bg-[var(--surface-success-bg)]"),
|
|
269
290
|
children: [
|
|
270
291
|
manageHref ? /* @__PURE__ */ jsx("a", {
|
|
271
292
|
href: manageHref,
|
|
@@ -302,6 +323,11 @@ function IntegrationsPanel({ catalog, connections, healthByConnectionId, isLoadi
|
|
|
302
323
|
}) : null]
|
|
303
324
|
})]
|
|
304
325
|
}),
|
|
326
|
+
connectionContext ? /* @__PURE__ */ jsx("span", {
|
|
327
|
+
className: "pointer-events-none w-full truncate text-[11px] leading-4 text-muted-foreground",
|
|
328
|
+
title: connectionContext,
|
|
329
|
+
children: connectionContext
|
|
330
|
+
}) : null,
|
|
305
331
|
/* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
306
332
|
asChild: true,
|
|
307
333
|
children: /* @__PURE__ */ jsx("button", {
|
|
@@ -334,7 +360,14 @@ function IntegrationsPanel({ catalog, connections, healthByConnectionId, isLoadi
|
|
|
334
360
|
}),
|
|
335
361
|
children: [/* @__PURE__ */ jsx(ExternalLink, { className: "mr-2 h-4 w-4" }), " Manage"]
|
|
336
362
|
}) : null,
|
|
337
|
-
|
|
363
|
+
connectionActions.map((action) => /* @__PURE__ */ jsx(DropdownMenuItem, {
|
|
364
|
+
disabled: action.disabled || pendingAction,
|
|
365
|
+
onSelect: () => {
|
|
366
|
+
runConnectionAction(action);
|
|
367
|
+
},
|
|
368
|
+
children: action.label
|
|
369
|
+
}, action.id)),
|
|
370
|
+
canManage || connectionActions.length > 0 ? /* @__PURE__ */ jsx(DropdownMenuSeparator, {}) : null,
|
|
338
371
|
/* @__PURE__ */ jsxs(DropdownMenuItem, {
|
|
339
372
|
"data-testid": `disconnect-${provider.providerId}`,
|
|
340
373
|
className: "text-destructive focus:text-destructive",
|
|
@@ -364,7 +397,7 @@ function IntegrationsPanel({ catalog, connections, healthByConnectionId, isLoadi
|
|
|
364
397
|
});
|
|
365
398
|
},
|
|
366
399
|
title: provider.description ? provider.description : `Connect ${name}`,
|
|
367
|
-
className: cn(
|
|
400
|
+
className: cn(tileBoxClass, "group border-border bg-card transition-all", "hover:border-[var(--border-strong)] hover:bg-accent/40 hover:shadow-sm", focusRing),
|
|
368
401
|
children: [/* @__PURE__ */ jsx(ProviderIcon, {
|
|
369
402
|
id: provider.providerId,
|
|
370
403
|
iconUrl: provider.iconUrl,
|
package/dist/styles.css
CHANGED
|
@@ -971,6 +971,9 @@
|
|
|
971
971
|
.max-h-\[90vh\] {
|
|
972
972
|
max-height: 90vh;
|
|
973
973
|
}
|
|
974
|
+
.max-h-\[min\(24rem\,calc\(var\(--radix-select-content-available-height\)-2px\)\)\] {
|
|
975
|
+
max-height: min(24rem, calc(var(--radix-select-content-available-height) - 2px));
|
|
976
|
+
}
|
|
974
977
|
.max-h-\[min\(60vh\,35rem\)\] {
|
|
975
978
|
max-height: min(60vh, 35rem);
|
|
976
979
|
}
|
|
@@ -980,6 +983,9 @@
|
|
|
980
983
|
.max-h-\[var\(--radix-dropdown-menu-content-available-height\)\] {
|
|
981
984
|
max-height: var(--radix-dropdown-menu-content-available-height);
|
|
982
985
|
}
|
|
986
|
+
.max-h-\[var\(--radix-select-content-available-height\)\] {
|
|
987
|
+
max-height: var(--radix-select-content-available-height);
|
|
988
|
+
}
|
|
983
989
|
.max-h-full {
|
|
984
990
|
max-height: 100%;
|
|
985
991
|
}
|
|
@@ -1043,6 +1049,9 @@
|
|
|
1043
1049
|
.min-h-\[120px\] {
|
|
1044
1050
|
min-height: 120px;
|
|
1045
1051
|
}
|
|
1052
|
+
.min-h-\[136px\] {
|
|
1053
|
+
min-height: 136px;
|
|
1054
|
+
}
|
|
1046
1055
|
.min-h-\[160px\] {
|
|
1047
1056
|
min-height: 160px;
|
|
1048
1057
|
}
|
|
@@ -1942,6 +1951,9 @@
|
|
|
1942
1951
|
.overflow-y-auto {
|
|
1943
1952
|
overflow-y: auto;
|
|
1944
1953
|
}
|
|
1954
|
+
.overscroll-contain {
|
|
1955
|
+
overscroll-behavior: contain;
|
|
1956
|
+
}
|
|
1945
1957
|
.\!rounded-full {
|
|
1946
1958
|
border-radius: calc(infinity * 1px) !important;
|
|
1947
1959
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cn$1 } from "./utils-DzWbktWG.js";
|
|
2
|
-
import { o as PortsList } from "./dashboard-
|
|
2
|
+
import { o as PortsList } from "./dashboard-_-b7laAR.js";
|
|
3
3
|
import { n as TerminalView } from "./terminal-DmSUfGha.js";
|
|
4
4
|
import { RichFileTree } from "./files.js";
|
|
5
5
|
import { n as PreviewView } from "./embedded-app-view-CoiS_kfY.js";
|
package/dist/workbench.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as computeDiffStats, c as BRAND_PRISM_THEME, d as DiffStatsBadge, f as GitStatusBadge, i as buildUnifiedPatch, l as CodeSurface, m as PillTabs, n as SandboxArtifactPane, o as CodeView, p as PanelHeader, r as DiffView, s as FileBreadcrumb, t as ChangesPane, u as resolveLanguage } from "./workbench-
|
|
1
|
+
import { a as computeDiffStats, c as BRAND_PRISM_THEME, d as DiffStatsBadge, f as GitStatusBadge, i as buildUnifiedPatch, l as CodeSurface, m as PillTabs, n as SandboxArtifactPane, o as CodeView, p as PanelHeader, r as DiffView, s as FileBreadcrumb, t as ChangesPane, u as resolveLanguage } from "./workbench-DknSt1S8.js";
|
|
2
2
|
import { n as PreviewView, t as EmbeddedAppView } from "./embedded-app-view-CoiS_kfY.js";
|
|
3
3
|
export { BRAND_PRISM_THEME, ChangesPane, CodeSurface, CodeView, DiffStatsBadge, DiffView, EmbeddedAppView, FileBreadcrumb, GitStatusBadge, PanelHeader, PillTabs, PreviewView, SandboxArtifactPane, buildUnifiedPatch, computeDiffStats, resolveLanguage };
|
package/package.json
CHANGED