@tangle-network/ui 11.4.0 → 11.5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @tangle-network/ui
2
2
 
3
+ ## 11.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8dbe359: Export `RunRowShell` (+ `RunRowStatusDot`, `RunRowStatus`) from the `/run` entry. The shell is the shared run-row grammar beneath `InlineToolItem`/`InlineThinkingItem`; consumers whose row carries behaviors the fixed items don't model (a treated title, a streaming plain-text body) can now compose the grammar directly instead of re-forking it.
8
+
3
9
  ## 11.4.0
4
10
 
5
11
  ### Minor Changes
package/dist/chat.js CHANGED
@@ -5,10 +5,10 @@ import {
5
5
  MessageList,
6
6
  ThinkingIndicator,
7
7
  UserMessage
8
- } from "./chunk-IH2VRPGZ.js";
8
+ } from "./chunk-RKC3GXHE.js";
9
9
  import "./chunk-AZWDI2JG.js";
10
- import "./chunk-SRAKCVPO.js";
11
- import "./chunk-4ORVXSMU.js";
10
+ import "./chunk-R5GVQDL3.js";
11
+ import "./chunk-J2G7KCYH.js";
12
12
  import "./chunk-ULDNFLIM.js";
13
13
  import "./chunk-AAUNOHVL.js";
14
14
  import "./chunk-3M7BPSSW.js";
@@ -216,20 +216,6 @@ function LiveDuration({ startTime }) {
216
216
  return /* @__PURE__ */ jsx3("span", { className: "text-xs font-mono text-neutral-400 dark:text-neutral-500 tabular-nums", children: formatDuration(elapsed) });
217
217
  }
218
218
 
219
- // src/run/inline-tool-item.tsx
220
- import { memo as memo2 } from "react";
221
- import {
222
- Terminal,
223
- FileEdit,
224
- FileSearch,
225
- Search,
226
- PencilLine,
227
- Bot,
228
- Globe,
229
- ClipboardList,
230
- Settings
231
- } from "lucide-react";
232
-
233
219
  // src/run/run-row-shell.tsx
234
220
  import { useState as useState3 } from "react";
235
221
  import * as Collapsible from "@radix-ui/react-collapsible";
@@ -347,6 +333,18 @@ function RunRowShell({
347
333
  }
348
334
 
349
335
  // src/run/inline-tool-item.tsx
336
+ import { memo as memo2 } from "react";
337
+ import {
338
+ Terminal,
339
+ FileEdit,
340
+ FileSearch,
341
+ Search,
342
+ PencilLine,
343
+ Bot,
344
+ Globe,
345
+ ClipboardList,
346
+ Settings
347
+ } from "lucide-react";
350
348
  import { jsx as jsx5 } from "react/jsx-runtime";
351
349
  var TOOL_CATEGORY_ICON_MAP = {
352
350
  command: Terminal,
@@ -500,6 +498,7 @@ export {
500
498
  ExpandableContent,
501
499
  ExpandedToolDetail,
502
500
  LiveDuration,
501
+ RunRowStatusDot,
503
502
  RunRowShell,
504
503
  InlineToolItem,
505
504
  ToolCallStep,
@@ -2,7 +2,7 @@ import {
2
2
  ExpandableContent,
3
3
  InlineToolItem,
4
4
  RunRowShell
5
- } from "./chunk-4ORVXSMU.js";
5
+ } from "./chunk-J2G7KCYH.js";
6
6
  import {
7
7
  formatDuration,
8
8
  truncateText
@@ -6,11 +6,11 @@ import {
6
6
  import {
7
7
  InlineThinkingItem,
8
8
  RunGroup
9
- } from "./chunk-SRAKCVPO.js";
9
+ } from "./chunk-R5GVQDL3.js";
10
10
  import {
11
11
  ToolCallGroup,
12
12
  ToolCallStep
13
- } from "./chunk-4ORVXSMU.js";
13
+ } from "./chunk-J2G7KCYH.js";
14
14
  import {
15
15
  getToolDisplayMetadata
16
16
  } from "./chunk-ULDNFLIM.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ToolCallGroup,
3
3
  ToolCallStep
4
- } from "./chunk-4ORVXSMU.js";
4
+ } from "./chunk-J2G7KCYH.js";
5
5
  import {
6
6
  Markdown
7
7
  } from "./chunk-P5F43A65.js";
@@ -11,7 +11,7 @@ import {
11
11
  } from "./chunk-OEX7NZE3.js";
12
12
  import {
13
13
  parseToolEvent
14
- } from "./chunk-J3YZIQNI.js";
14
+ } from "./chunk-XPYPZMYT.js";
15
15
 
16
16
  // src/hooks/use-dropdown-menu.ts
17
17
  import { useEffect, useRef, useState } from "react";
package/dist/hooks.js CHANGED
@@ -11,15 +11,15 @@ import {
11
11
  useSSEStream,
12
12
  useSdkSession,
13
13
  useToolCallStream
14
- } from "./chunk-HW4ROISY.js";
14
+ } from "./chunk-XROQW5J7.js";
15
15
  import "./chunk-OEX7NZE3.js";
16
16
  import {
17
17
  useAutoScroll,
18
18
  useRunCollapseState,
19
19
  useRunGroups
20
20
  } from "./chunk-AZWDI2JG.js";
21
- import "./chunk-J3YZIQNI.js";
22
- import "./chunk-4ORVXSMU.js";
21
+ import "./chunk-XPYPZMYT.js";
22
+ import "./chunk-J2G7KCYH.js";
23
23
  import "./chunk-ULDNFLIM.js";
24
24
  import "./chunk-AAUNOHVL.js";
25
25
  import "./chunk-ZRVH3WCA.js";
package/dist/index.d.ts CHANGED
@@ -3,7 +3,7 @@ export { Avatar, AvatarFallback, AvatarImage, Badge, BadgeProps, Card, CardConte
3
3
  export { Logo, LogoProps, TangleKnot } from '@tangle-network/brand';
4
4
  export { A as ArtifactPane, a as ArtifactPaneProps } from './artifact-pane-DpuWcAiF.js';
5
5
  export { AgentTimeline, AgentTimelineArtifactItem, AgentTimelineCustomItem, AgentTimelineItem, AgentTimelineMessageItem, AgentTimelineProps, AgentTimelineStatusItem, AgentTimelineTone, AgentTimelineToolGroupItem, AgentTimelineToolItem, ChatContainer, ChatContainerProps, ChatMessage, ChatMessageProps, MessageList, MessageListProps, MessageRole, ThinkingIndicator, ThinkingIndicatorProps, UserMessage, UserMessageProps } from './chat.js';
6
- export { ExpandedToolDetail, ExpandedToolDetailProps, InlineThinkingItem, InlineThinkingItemProps, InlineToolItem, InlineToolItemProps, LiveDuration, RunGroup, RunGroupProps } from './run.js';
6
+ export { ExpandedToolDetail, ExpandedToolDetailProps, InlineThinkingItem, InlineThinkingItemProps, InlineToolItem, InlineToolItemProps, LiveDuration, RunGroup, RunGroupProps, RunRowShell, RunRowShellProps, RunRowStatus, RunRowStatusDot } from './run.js';
7
7
  export { F as FeedSegment, T as ToolCallData, a as ToolCallFeed, b as ToolCallFeedProps, c as ToolCallStatus, d as ToolCallType, p as parseToolEvent } from './tool-call-feed-D9iofJgW.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 { FileArtifactPane, FileArtifactPaneProps, FileFormat, FileNode, FilePreview, FilePreviewProps, FileTabData, FileTabs, FileTabsProps, FileTree, FileTreeProps, FileTreeVisibilityOptions, RichFileTree, RichFileTreeGitEntry, RichFileTreeGitStatus, RichFileTreeProps, RichFileTreeThemeVars, detectFileFormat, fileExtension, filterFileTree, getCodeLanguage, getFormatLabel, getSyntaxLanguage } from './files.js';
package/dist/index.js CHANGED
@@ -20,7 +20,7 @@ import {
20
20
  useSSEStream,
21
21
  useSdkSession,
22
22
  useToolCallStream
23
- } from "./chunk-HW4ROISY.js";
23
+ } from "./chunk-XROQW5J7.js";
24
24
  import {
25
25
  addMessage,
26
26
  addParts,
@@ -146,26 +146,28 @@ import {
146
146
  MessageList,
147
147
  ThinkingIndicator,
148
148
  UserMessage
149
- } from "./chunk-IH2VRPGZ.js";
149
+ } from "./chunk-RKC3GXHE.js";
150
150
  import {
151
151
  useAutoScroll,
152
152
  useRunCollapseState,
153
153
  useRunGroups
154
154
  } from "./chunk-AZWDI2JG.js";
155
- import "./chunk-47XH56SV.js";
155
+ import "./chunk-LQS34IGP.js";
156
156
  import {
157
157
  ToolCallFeed,
158
158
  parseToolEvent
159
- } from "./chunk-J3YZIQNI.js";
159
+ } from "./chunk-XPYPZMYT.js";
160
160
  import {
161
161
  InlineThinkingItem,
162
162
  RunGroup
163
- } from "./chunk-SRAKCVPO.js";
163
+ } from "./chunk-R5GVQDL3.js";
164
164
  import {
165
165
  ExpandedToolDetail,
166
166
  InlineToolItem,
167
- LiveDuration
168
- } from "./chunk-4ORVXSMU.js";
167
+ LiveDuration,
168
+ RunRowShell,
169
+ RunRowStatusDot
170
+ } from "./chunk-J2G7KCYH.js";
169
171
  import {
170
172
  TOOL_CATEGORY_ICONS,
171
173
  formatBytes,
@@ -324,6 +326,8 @@ export {
324
326
  RedactedDocument,
325
327
  RichFileTree,
326
328
  RunGroup,
329
+ RunRowShell,
330
+ RunRowStatusDot,
327
331
  SegmentedControl,
328
332
  Select,
329
333
  SelectContent,
package/dist/run.d.ts CHANGED
@@ -28,6 +28,53 @@ interface RunGroupProps {
28
28
  */
29
29
  declare const RunGroup: React.MemoExoticComponent<({ run, partMap, collapsed, onToggle, branding, renderToolDetail, headerActions, renderToolActions, }: RunGroupProps) => react_jsx_runtime.JSX.Element | null>;
30
30
 
31
+ type RunRowStatus = "running" | "success" | "error" | "idle";
32
+ /**
33
+ * Trailing status indicator shared by every run row: a spinner while running,
34
+ * a green/red dot on terminal states, nothing when idle. Status is shown here
35
+ * — it never replaces the row's semantic lead icon.
36
+ */
37
+ declare function RunRowStatusDot({ status }: {
38
+ status: RunRowStatus;
39
+ }): react_jsx_runtime.JSX.Element | null;
40
+ interface RunRowShellProps {
41
+ /** Semantic lead glyph — always visible; never replaced by status. */
42
+ icon: ReactNode;
43
+ /** Row title. A string in the common case; a node when the title carries its
44
+ * own treatment (e.g. an active-state shimmer sweep) — it renders inline in
45
+ * the shell's title slot either way. */
46
+ title: ReactNode;
47
+ /** Secondary inline text (tool path/command, or a reasoning preview). */
48
+ description?: string;
49
+ /** Render the description in mono (tools) vs prose (reasoning). */
50
+ descriptionMono?: boolean;
51
+ status?: RunRowStatus;
52
+ /** Live-ticks a duration while running. */
53
+ startTime?: number;
54
+ /** Static duration shown once the row is no longer running. */
55
+ durationMs?: number;
56
+ /** Radius shaping when rows are stacked into a group. */
57
+ groupPosition?: "single" | "first" | "middle" | "last";
58
+ /** Message shown below the header while collapsed (tool errors). */
59
+ collapsedError?: string;
60
+ actions?: ReactNode;
61
+ /** Controlled open state. Omit for internal (uncontrolled) state. */
62
+ open?: boolean;
63
+ onOpenChange?: (open: boolean) => void;
64
+ defaultOpen?: boolean;
65
+ className?: string;
66
+ contentClassName?: string;
67
+ /** Expanded body. When absent the row is not expandable. */
68
+ children?: ReactNode;
69
+ }
70
+ /**
71
+ * Shared shell for the agent activity rows (reasoning + tool). Owns the
72
+ * bordered container, the lead icon badge, title/description, the trailing
73
+ * meta cluster (duration + status + chevron) and the collapsible body, so
74
+ * both row kinds read as one family instead of two bespoke layouts.
75
+ */
76
+ declare function RunRowShell({ icon, title, description, descriptionMono, status, startTime, durationMs, groupPosition, collapsedError, actions, open: openProp, onOpenChange, defaultOpen, className, contentClassName, children, }: RunRowShellProps): react_jsx_runtime.JSX.Element;
77
+
31
78
  interface InlineToolItemProps {
32
79
  part: ToolPart;
33
80
  renderToolDetail?: CustomToolRenderer;
@@ -71,4 +118,4 @@ declare function LiveDuration({ startTime }: {
71
118
  startTime: number;
72
119
  }): react_jsx_runtime.JSX.Element;
73
120
 
74
- export { ExpandedToolDetail, type ExpandedToolDetailProps, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, LiveDuration, RunGroup, type RunGroupProps };
121
+ export { ExpandedToolDetail, type ExpandedToolDetailProps, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, LiveDuration, RunGroup, type RunGroupProps, RunRowShell, type RunRowShellProps, type RunRowStatus, RunRowStatusDot };
package/dist/run.js CHANGED
@@ -1,17 +1,19 @@
1
- import "./chunk-47XH56SV.js";
1
+ import "./chunk-LQS34IGP.js";
2
2
  import {
3
3
  ToolCallFeed,
4
4
  parseToolEvent
5
- } from "./chunk-J3YZIQNI.js";
5
+ } from "./chunk-XPYPZMYT.js";
6
6
  import {
7
7
  InlineThinkingItem,
8
8
  RunGroup
9
- } from "./chunk-SRAKCVPO.js";
9
+ } from "./chunk-R5GVQDL3.js";
10
10
  import {
11
11
  ExpandedToolDetail,
12
12
  InlineToolItem,
13
- LiveDuration
14
- } from "./chunk-4ORVXSMU.js";
13
+ LiveDuration,
14
+ RunRowShell,
15
+ RunRowStatusDot
16
+ } from "./chunk-J2G7KCYH.js";
15
17
  import "./chunk-ULDNFLIM.js";
16
18
  import "./chunk-AAUNOHVL.js";
17
19
  import "./chunk-3M7BPSSW.js";
@@ -27,6 +29,8 @@ export {
27
29
  InlineToolItem,
28
30
  LiveDuration,
29
31
  RunGroup,
32
+ RunRowShell,
33
+ RunRowStatusDot,
30
34
  ToolCallFeed,
31
35
  parseToolEvent
32
36
  };
package/dist/sdk-hooks.js CHANGED
@@ -5,15 +5,15 @@ import {
5
5
  useSSEStream,
6
6
  useSdkSession,
7
7
  useToolCallStream
8
- } from "./chunk-HW4ROISY.js";
8
+ } from "./chunk-XROQW5J7.js";
9
9
  import "./chunk-OEX7NZE3.js";
10
10
  import {
11
11
  useAutoScroll,
12
12
  useRunCollapseState,
13
13
  useRunGroups
14
14
  } from "./chunk-AZWDI2JG.js";
15
- import "./chunk-J3YZIQNI.js";
16
- import "./chunk-4ORVXSMU.js";
15
+ import "./chunk-XPYPZMYT.js";
16
+ import "./chunk-J2G7KCYH.js";
17
17
  import "./chunk-ULDNFLIM.js";
18
18
  import "./chunk-AAUNOHVL.js";
19
19
  import "./chunk-ZRVH3WCA.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/ui",
3
- "version": "11.4.0",
3
+ "version": "11.5.0",
4
4
  "description": "Generic React UI components for Tangle products — primitives, chat, run, files, editor, markdown.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/run/index.ts CHANGED
@@ -1,4 +1,10 @@
1
1
  export { RunGroup, type RunGroupProps } from "./run-group";
2
+ export {
3
+ RunRowShell,
4
+ RunRowStatusDot,
5
+ type RunRowShellProps,
6
+ type RunRowStatus,
7
+ } from "./run-row-shell";
2
8
  export { InlineToolItem, type InlineToolItemProps } from "./inline-tool-item";
3
9
  export {
4
10
  InlineThinkingItem,
File without changes