@tangle-network/sandbox-ui 0.138.1 → 0.138.2
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/{diff-view-A0O0Z_SR.js → diff-view-B9mNeTLF.js} +2 -1
- package/dist/index.js +4 -4
- package/dist/reveal-in-scroller-CzKwuqCG.js +25 -0
- package/dist/{tree-data-YXtcK6Ld.js → tree-data-Dmiu8aMf.js} +3 -1
- package/dist/vault-tree.js +1 -1
- package/dist/workbench/diff.js +1 -1
- package/dist/{workbench-B3JL1qbt.js → workbench-DOgYO3Zg.js} +1 -1
- package/dist/workbench.js +2 -2
- package/dist/{workspace-DRhi6S3o.js → workspace-C9TH6A2O.js} +1 -1
- package/dist/workspace.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { t as cn } from "./utils-BER_bdgE.js";
|
|
2
|
+
import { t as revealInScroller } from "./reveal-in-scroller-CzKwuqCG.js";
|
|
2
3
|
import { Button } from "@tangle-network/ui/primitives";
|
|
3
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
5
|
import * as React$1 from "react";
|
|
@@ -56,7 +57,7 @@ function CodeSurface({ code, filename, language, showLineNumbers = true, wrap =
|
|
|
56
57
|
start: target,
|
|
57
58
|
end: target
|
|
58
59
|
});
|
|
59
|
-
element
|
|
60
|
+
revealInScroller(element, "center");
|
|
60
61
|
}, []);
|
|
61
62
|
React$1.useLayoutEffect(() => {
|
|
62
63
|
const host = hostRef.current;
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { n as __reExport, t as __exportAll } from "./rolldown-runtime-782esTHO.js";
|
|
2
2
|
import { i as TangleKnot, n as SectionTitle, r as Logo, t as primitives_exports } from "./primitives-CiwDp4-0.js";
|
|
3
3
|
import { i as WorkspacePaneHeader, n as SHELL_INSET_GUTTER, r as ShellHeader, t as SHELL_HEADER_HEIGHT } from "./shell-header-CwqDzC4I.js";
|
|
4
|
-
import { C as WorkspaceSurfaceTitle, S as WorkspaceSurfaceFrame, _ as StatusBar, a as TaskBoard, b as WorkspaceLayout, c as createShellShouldRevalidate, d as SESSION_CREATED_EVENT, f as dispatchSessionCreated, g as TerminalPanel, h as RuntimePane, i as CalendarView, l as shellShouldRevalidate, m as formatRelativeAge, n as WorkspaceFilesPane, o as SandboxWorkbench, p as useOptimisticSessionItems, r as ApprovalQueue, s as WorkspaceArtifactView, t as ArtifactPane, u as SessionSidebar, v as StatusBanner, x as WorkspaceSurface, y as DirectoryPane } from "./workspace-
|
|
5
|
-
import { i as VaultTree, n as filterFileNodes, r as VAULT_TREE_CHILD_PAGE, t as fileTreeFromPaths } from "./tree-data-
|
|
4
|
+
import { C as WorkspaceSurfaceTitle, S as WorkspaceSurfaceFrame, _ as StatusBar, a as TaskBoard, b as WorkspaceLayout, c as createShellShouldRevalidate, d as SESSION_CREATED_EVENT, f as dispatchSessionCreated, g as TerminalPanel, h as RuntimePane, i as CalendarView, l as shellShouldRevalidate, m as formatRelativeAge, n as WorkspaceFilesPane, o as SandboxWorkbench, p as useOptimisticSessionItems, r as ApprovalQueue, s as WorkspaceArtifactView, t as ArtifactPane, u as SessionSidebar, v as StatusBanner, x as WorkspaceSurface, y as DirectoryPane } from "./workspace-C9TH6A2O.js";
|
|
5
|
+
import { i as VaultTree, n as filterFileNodes, r as VAULT_TREE_CHILD_PAGE, t as fileTreeFromPaths } from "./tree-data-Dmiu8aMf.js";
|
|
6
6
|
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-ClKA3opr.js";
|
|
7
7
|
import { i as modelBrandFor, n as ProviderMark, r as canonicalModelId, t as ModelBrandStack } from "./model-brand-bTcMjQtB.js";
|
|
8
8
|
import { a as formatPrice, i as PricingPage, n as SandboxPageShell, o as BillingDashboard, r as UsageChart, t as DashboardPageHeader } from "./page-layout-CuOpvZys.js";
|
|
9
9
|
import { t as usePtySession } from "./use-pty-session-BHVQlSs-.js";
|
|
10
|
-
import { a as DiffStatsBadge, c as PillTabs, i as FileBreadcrumb, n as SandboxArtifactPane, o as GitStatusBadge, r as CodeView, s as PanelHeader, t as ChangesPane } from "./workbench-
|
|
10
|
+
import { a as DiffStatsBadge, c as PillTabs, i as FileBreadcrumb, n as SandboxArtifactPane, o as GitStatusBadge, r as CodeView, s as PanelHeader, t as ChangesPane } from "./workbench-DOgYO3Zg.js";
|
|
11
11
|
import { CSV_PREVIEW_ROW_LIMIT, FileArtifactPane, FileCard, FileList, FilePreview, FileTabs, FileTree, PdfViewer, RichFileTree, configurePdfViewer, detectFileFormat, fileExtension, filterFileTree, getCodeLanguage, getFormatLabel, getSyntaxLanguage, parseCsv, resolveFilePreviewKind } from "./files.js";
|
|
12
|
-
import { a as CodeSurface, i as CODE_THEME, n as buildUnifiedPatch, r as computeDiffStats, t as DiffView } from "./diff-view-
|
|
12
|
+
import { a as CodeSurface, i as CODE_THEME, n as buildUnifiedPatch, r as computeDiffStats, t as DiffView } from "./diff-view-B9mNeTLF.js";
|
|
13
13
|
import { n as PreviewView, t as EmbeddedAppView } from "./embedded-app-view-DXsoPale.js";
|
|
14
14
|
import { OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, findUnsupportedOpenUINode, validateOpenUIJsonArtifact, validateOpenUIJsonNode } from "./openui.js";
|
|
15
15
|
import { a as MessageList, c as UserMessage, d as modelProvider, f as snapHarnessToModel, g as ReasoningLevelPicker, h as HARNESS_REASONING_OPTIONS, i as MessageAuthor, l as isViewerMessage, m as DEFAULT_REASONING_LEVEL_OPTIONS, n as ChatContainer, o as TRANSCRIPT_TEXT, p as AgentProfilePicker, r as ChatMessage, s as ThinkingIndicator, t as AgentTimeline, u as ArtifactAgentDock } from "./chat-BYTVLZQW.js";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// src/lib/reveal-in-scroller.ts
|
|
2
|
+
/**
|
|
3
|
+
* Scrolls an element into view inside its nearest scrolling ancestor only. Element.scrollIntoView moves every scrolling
|
|
4
|
+
* ancestor, the window included, so a pane that reveals its selection on load would jump the whole page.
|
|
5
|
+
*/
|
|
6
|
+
function revealInScroller(element, block = "nearest") {
|
|
7
|
+
let scroller = parentOf(element);
|
|
8
|
+
while (scroller && !scrolls(scroller)) scroller = parentOf(scroller);
|
|
9
|
+
if (!scroller || scroller === document.scrollingElement || scroller === document.body) return;
|
|
10
|
+
const box = scroller.getBoundingClientRect();
|
|
11
|
+
const target = element.getBoundingClientRect();
|
|
12
|
+
const above = target.top - box.top;
|
|
13
|
+
const below = target.bottom - box.top - scroller.clientHeight;
|
|
14
|
+
if (block === "center") scroller.scrollTop += above - (scroller.clientHeight - target.height) / 2;
|
|
15
|
+
else if (above < 0) scroller.scrollTop += above;
|
|
16
|
+
else if (below > 0) scroller.scrollTop += Math.min(below, above);
|
|
17
|
+
}
|
|
18
|
+
function parentOf(node) {
|
|
19
|
+
return node.parentElement ?? node.getRootNode().host ?? null;
|
|
20
|
+
}
|
|
21
|
+
function scrolls(node) {
|
|
22
|
+
const { overflowY } = getComputedStyle(node);
|
|
23
|
+
return (overflowY === "auto" || overflowY === "scroll") && node.scrollHeight > node.clientHeight;
|
|
24
|
+
}
|
|
25
|
+
export { revealInScroller as t };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { t as revealInScroller } from "./reveal-in-scroller-CzKwuqCG.js";
|
|
1
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
4
|
import { ChevronRight, File, FileCode, FileImage, FileJson, FileSpreadsheet, FileText, Folder, FolderOpen } from "lucide-react";
|
|
@@ -202,7 +203,8 @@ function VaultTree({ root, selectedPath, activeFolder, onSelect, onFolderToggle,
|
|
|
202
203
|
const reveal = pendingRevealRef.current;
|
|
203
204
|
if (reveal && rowRefs.current.has(reveal)) {
|
|
204
205
|
pendingRevealRef.current = null;
|
|
205
|
-
rowRefs.current.get(reveal)
|
|
206
|
+
const row = rowRefs.current.get(reveal);
|
|
207
|
+
if (row) revealInScroller(row);
|
|
206
208
|
}
|
|
207
209
|
const focus = pendingFocusRef.current;
|
|
208
210
|
if (focus && rowRefs.current.has(focus)) {
|
package/dist/vault-tree.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { r as VAULT_TREE_CHILD_PAGE, i as VaultTree, t as fileTreeFromPaths, n as filterFileNodes } from "./tree-data-
|
|
1
|
+
export { r as VAULT_TREE_CHILD_PAGE, i as VaultTree, t as fileTreeFromPaths, n as filterFileNodes } from "./tree-data-Dmiu8aMf.js";
|
package/dist/workbench/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as DiffView } from "../diff-view-
|
|
1
|
+
export { t as DiffView } from "../diff-view-B9mNeTLF.js";
|
|
@@ -2,7 +2,7 @@ import { t as cn$1 } from "./utils-BER_bdgE.js";
|
|
|
2
2
|
import { a as PortsList } from "./dashboard-ClKA3opr.js";
|
|
3
3
|
import { n as TerminalView } from "./terminal-nUCznZRj.js";
|
|
4
4
|
import { RichFileTree } from "./files.js";
|
|
5
|
-
import { a as CodeSurface, n as buildUnifiedPatch, r as computeDiffStats, t as DiffView } from "./diff-view-
|
|
5
|
+
import { a as CodeSurface, n as buildUnifiedPatch, r as computeDiffStats, t as DiffView } from "./diff-view-B9mNeTLF.js";
|
|
6
6
|
import { n as PreviewView } from "./embedded-app-view-DXsoPale.js";
|
|
7
7
|
import { Button, Skeleton, Textarea } from "@tangle-network/ui/primitives";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
package/dist/workbench.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as DiffStatsBadge, c as PillTabs, i as FileBreadcrumb, n as SandboxArtifactPane, o as GitStatusBadge, r as CodeView, s as PanelHeader, t as ChangesPane } from "./workbench-
|
|
2
|
-
import { a as CodeSurface, i as CODE_THEME, n as buildUnifiedPatch, r as computeDiffStats, t as DiffView } from "./diff-view-
|
|
1
|
+
import { a as DiffStatsBadge, c as PillTabs, i as FileBreadcrumb, n as SandboxArtifactPane, o as GitStatusBadge, r as CodeView, s as PanelHeader, t as ChangesPane } from "./workbench-DOgYO3Zg.js";
|
|
2
|
+
import { a as CodeSurface, i as CODE_THEME, n as buildUnifiedPatch, r as computeDiffStats, t as DiffView } from "./diff-view-B9mNeTLF.js";
|
|
3
3
|
import { n as PreviewView, t as EmbeddedAppView } from "./embedded-app-view-DXsoPale.js";
|
|
4
4
|
export { CODE_THEME, ChangesPane, CodeSurface, CodeView, DiffStatsBadge, DiffView, EmbeddedAppView, FileBreadcrumb, GitStatusBadge, PanelHeader, PillTabs, PreviewView, SandboxArtifactPane, buildUnifiedPatch, computeDiffStats };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cn$1 } from "./utils-BER_bdgE.js";
|
|
2
2
|
import { r as ShellHeader } from "./shell-header-CwqDzC4I.js";
|
|
3
3
|
import { t as MOTION_CONTROL } from "./motion-Bn7ESHrj.js";
|
|
4
|
-
import { i as VaultTree, n as filterFileNodes, t as fileTreeFromPaths } from "./tree-data-
|
|
4
|
+
import { i as VaultTree, n as filterFileNodes, t as fileTreeFromPaths } from "./tree-data-Dmiu8aMf.js";
|
|
5
5
|
import { ArtifactPane, ArtifactPane as ArtifactPane$1, Button, EmptyState, Input, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@tangle-network/ui/primitives";
|
|
6
6
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { Markdown } from "@tangle-network/ui/markdown";
|
package/dist/workspace.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { i as WorkspacePaneHeader, n as SHELL_INSET_GUTTER, r as ShellHeader, t as SHELL_HEADER_HEIGHT } from "./shell-header-CwqDzC4I.js";
|
|
2
|
-
import { C as WorkspaceSurfaceTitle, S as WorkspaceSurfaceFrame, _ as StatusBar, a as TaskBoard, b as WorkspaceLayout, c as createShellShouldRevalidate, d as SESSION_CREATED_EVENT, f as dispatchSessionCreated, g as TerminalPanel, h as RuntimePane, i as CalendarView, l as shellShouldRevalidate, m as formatRelativeAge, n as WorkspaceFilesPane, o as SandboxWorkbench, p as useOptimisticSessionItems, r as ApprovalQueue, s as WorkspaceArtifactView, t as ArtifactPane, u as SessionSidebar, v as StatusBanner, x as WorkspaceSurface, y as DirectoryPane } from "./workspace-
|
|
2
|
+
import { C as WorkspaceSurfaceTitle, S as WorkspaceSurfaceFrame, _ as StatusBar, a as TaskBoard, b as WorkspaceLayout, c as createShellShouldRevalidate, d as SESSION_CREATED_EVENT, f as dispatchSessionCreated, g as TerminalPanel, h as RuntimePane, i as CalendarView, l as shellShouldRevalidate, m as formatRelativeAge, n as WorkspaceFilesPane, o as SandboxWorkbench, p as useOptimisticSessionItems, r as ApprovalQueue, s as WorkspaceArtifactView, t as ArtifactPane, u as SessionSidebar, v as StatusBanner, x as WorkspaceSurface, y as DirectoryPane } from "./workspace-C9TH6A2O.js";
|
|
3
3
|
export { ApprovalQueue, ArtifactPane, CalendarView, DirectoryPane, RuntimePane, SESSION_CREATED_EVENT, SHELL_HEADER_HEIGHT, SHELL_INSET_GUTTER, SandboxWorkbench, SessionSidebar, ShellHeader, StatusBanner, StatusBar, TaskBoard, TerminalPanel, WorkspaceArtifactView, WorkspaceFilesPane, WorkspaceLayout, WorkspacePaneHeader, WorkspaceSurface, WorkspaceSurfaceFrame, WorkspaceSurfaceTitle, createShellShouldRevalidate, dispatchSessionCreated, formatRelativeAge, shellShouldRevalidate, useOptimisticSessionItems };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tangle-network/sandbox-ui",
|
|
3
|
-
"version": "0.138.
|
|
3
|
+
"version": "0.138.2",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Unified UI component library for Tangle Sandbox — primitives, chat, dashboard, terminal, editor, and workspace components",
|
|
6
6
|
"repository": {
|