@tangle-network/ui 11.51.12 → 11.51.14
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 +13 -1
- package/dist/chat/chat-message.js +1 -1
- package/dist/chat/user-message.js +1 -1
- package/dist/hooks.js +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +6 -6
- package/dist/primitives/expandable-panel.d.ts +19 -0
- package/dist/primitives/expandable-panel.js +69 -0
- package/dist/primitives.d.ts +2 -1
- package/dist/primitives.js +2 -1
- package/dist/run/run-row-shell.d.ts +0 -13
- package/dist/run/run-row-shell.js +3 -15
- package/dist/run/status-meta.d.ts +0 -2
- package/dist/run/status-meta.js +1 -7
- package/dist/run.d.ts +3 -4
- package/dist/run.js +3 -4
- package/dist/utils/format.d.ts +0 -4
- package/dist/utils/format.js +1 -12
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +2 -2
- package/package.json +1 -1
- package/src/chat/chat-message.tsx +1 -1
- package/src/chat/message-author.test.tsx +6 -6
- package/src/chat/speaker.stories.tsx +1 -1
- package/src/chat/synthetic-text.test.tsx +2 -2
- package/src/chat/user-message.tsx +1 -1
- package/src/primitives/control-presentation.test.tsx +0 -92
- package/src/primitives/expandable-panel.stories.tsx +36 -0
- package/src/primitives/expandable-panel.test.tsx +49 -0
- package/src/primitives/expandable-panel.tsx +108 -0
- package/src/primitives/index.ts +3 -0
- package/src/run/index.ts +0 -3
- package/src/run/run-row-shell.tsx +4 -20
- package/src/run/status-meta.tsx +0 -3
- package/src/utils/format.ts +0 -13
- package/dist/run/run-item-primitives.d.ts +0 -3
- package/dist/run/run-item-primitives.js +0 -12
- package/src/primitives/switch.test.tsx +0 -39
- package/src/primitives/toolbar.test.tsx +0 -103
- package/src/run/run-item-primitives.tsx +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
## 11.51.14
|
|
2
|
+
|
|
3
|
+
### Patch Changes
|
|
4
|
+
|
|
5
|
+
- 40a98a3: Add `ExpandablePanel` to `@tangle-network/ui/primitives`: any panel can fill the screen in place, keeping its subtree, and Escape closes the top-most one after inner popovers, menus and dialogs.
|
|
6
|
+
|
|
7
|
+
## 11.51.13
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- 919beef: The user's turn in `UserMessage` and `ChatMessage` is an indigo tint (`bg-primary/15`, foreground text) instead of the inverted foreground bubble, which rendered near-white in dark mode beside dark transcripts (run-page panel, 2026-11-04).
|
|
12
|
+
|
|
1
13
|
## 11.51.12
|
|
2
14
|
|
|
3
15
|
### Patch Changes
|
|
@@ -545,7 +557,7 @@
|
|
|
545
557
|
|
|
546
558
|
### Patch Changes
|
|
547
559
|
|
|
548
|
-
- 11fbba5: Chat text renders at the 15px body size. The user bubble, assistant prose, legacy `ChatMessage` and thinking timer wrote their size tokens as `text-[var(--font-size
|
|
560
|
+
- 11fbba5: Chat text renders at the 15px body size. The user bubble, assistant prose, legacy `ChatMessage` and thinking timer wrote their size tokens as `text-[var(--font-size-…)]`, which Tailwind compiles to a color, so assistant prose fell back to the Markdown default of 14px and the user bubble inherited 16px. They now use `text-[length:var(...)]`, and the dist check fails on the untyped form.
|
|
549
561
|
|
|
550
562
|
The streaming caret follows the last word instead of starting a new line. A code block that scrolls sideways takes keyboard focus as a named region (axe `scrollable-region-focusable`). The Show more toggle under a tool's output or error sits inside the card's inset instead of against its edge.
|
|
551
563
|
|
|
@@ -32,7 +32,7 @@ function ChatMessage({ role, content, toolCalls, isStreaming, timestamp, classNa
|
|
|
32
32
|
children: formatUtcTime(timestamp)
|
|
33
33
|
})]
|
|
34
34
|
}), /* @__PURE__ */ jsxs("div", {
|
|
35
|
-
className: cn("min-w-0 max-w-[85%] space-y-1", fromViewer ? "rounded-[var(--radius-lg)] bg-
|
|
35
|
+
className: cn("min-w-0 max-w-[85%] space-y-1", fromViewer ? "rounded-[var(--radius-lg)] bg-primary/15 px-[var(--chat-message-px)] py-[var(--chat-message-py)] text-foreground" : fromOtherPerson ? "rounded-[var(--radius-lg)] border border-border bg-card px-[var(--chat-message-px)] py-[var(--chat-message-py)] text-foreground" : isAssistant ? "text-foreground" : "rounded-[var(--radius-lg)] border border-border bg-card px-[var(--chat-message-px)] py-[var(--chat-message-py)]"),
|
|
36
36
|
children: [isUser ? /* @__PURE__ */ jsx("div", {
|
|
37
37
|
className: cn("whitespace-pre-wrap", TRANSCRIPT_TEXT),
|
|
38
38
|
children: content
|
|
@@ -61,7 +61,7 @@ function UserBubble({ text, timestamp, actions, lines }) {
|
|
|
61
61
|
children: /* @__PURE__ */ jsxs("div", {
|
|
62
62
|
className: "group flex min-w-0 max-w-[78%] flex-col items-end gap-2",
|
|
63
63
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
64
|
-
className: "relative w-full min-w-0 rounded-2xl bg-
|
|
64
|
+
className: "relative w-full min-w-0 rounded-2xl bg-primary/15 px-4 py-3 text-foreground",
|
|
65
65
|
children: [timestamp ? /* @__PURE__ */ jsx("span", {
|
|
66
66
|
"data-user-message-time": "",
|
|
67
67
|
className: "pointer-events-none absolute right-full top-1/2 mr-3 -translate-y-1/2 whitespace-nowrap text-sm text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100",
|
package/dist/hooks.js
CHANGED
|
@@ -2,8 +2,8 @@ import { useRunGroups } from "./hooks/use-run-groups.js";
|
|
|
2
2
|
import { useRunCollapseState } from "./hooks/use-run-collapse-state.js";
|
|
3
3
|
import { useFollowTail } from "./hooks/use-follow-tail.js";
|
|
4
4
|
import { useAutoScroll } from "./hooks/use-auto-scroll.js";
|
|
5
|
-
import { useLiveTime, useRunNow } from "./hooks/use-live-time.js";
|
|
6
5
|
import { useDropdownMenu } from "./hooks/use-dropdown-menu.js";
|
|
6
|
+
import { useLiveTime, useRunNow } from "./hooks/use-live-time.js";
|
|
7
7
|
import { useToolCallStream } from "./hooks/use-tool-call-stream.js";
|
|
8
8
|
import { createAuthFetcher, useApiKey, useAuth } from "./hooks/use-auth.js";
|
|
9
9
|
import { RealtimeSessionRegistry, useRealtimeSession } from "./hooks/use-realtime-session.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -110,17 +110,17 @@ import { PeriodDelta, SeriesExtent, SeriesPoint, SeriesPointInput, SeriesScale,
|
|
|
110
110
|
import { SeriesSparkline, SeriesSparklineProps } from "./primitives/series-sparkline.js";
|
|
111
111
|
import { ChartReferenceLine, MetricChart, MetricChartProps } from "./primitives/metric-chart.js";
|
|
112
112
|
import { FilterField, FilterFieldProps, Toolbar, ToolbarProps } from "./primitives/toolbar.js";
|
|
113
|
+
import { ExpandablePanel, ExpandablePanelProps } from "./primitives/expandable-panel.js";
|
|
113
114
|
import { Logo, LogoProps, TangleKnot } from "./primitives.js";
|
|
114
115
|
import { RunGroup, RunGroupProps } from "./run/run-group.js";
|
|
115
|
-
import { RunRowShell, RunRowShellProps, RunRowStatus
|
|
116
|
+
import { RunRowShell, RunRowShellProps, RunRowStatus } from "./run/run-row-shell.js";
|
|
116
117
|
import { InlineToolItem, InlineToolItemProps } from "./run/inline-tool-item.js";
|
|
117
118
|
import { InlineThinkingItem, InlineThinkingItemProps } from "./run/inline-thinking-item.js";
|
|
118
119
|
import { ExpandedToolDetail, ExpandedToolDetailProps } from "./run/expanded-tool-detail.js";
|
|
119
|
-
import { LiveDuration } from "./run/run-item-primitives.js";
|
|
120
120
|
import { TaskList, TaskListItem, TaskListProps, TaskStatus, showsTaskPriority, taskProgress, taskStatus } from "./run/task-list.js";
|
|
121
121
|
import { ApprovalCard, ApprovalCardProps, ApprovalDiffFile, ApprovalDiffSummary, ApprovalPlanStep } from "./run/approval-card.js";
|
|
122
122
|
import { RunPhase, RunPhaseList } from "./run/run-phase-list.js";
|
|
123
|
-
import { RunStatus, RunStatusIcon, RunStatusIconProps, StatusMeta,
|
|
123
|
+
import { RunStatus, RunStatusIcon, RunStatusIconProps, StatusMeta, runStatus, statusMeta } from "./run/status-meta.js";
|
|
124
124
|
import "./run.js";
|
|
125
125
|
import { OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES } from "./openui/schema-data.js";
|
|
126
126
|
import { OpenUISchemaIssue, OpenUISchemaValidation, findUnsupportedOpenUINode, validateOpenUIJsonArtifact, validateOpenUIJsonNode } from "./openui-schema.js";
|
|
@@ -132,7 +132,7 @@ import "./markdown.js";
|
|
|
132
132
|
import { addMessage, addParts, clearChat, isStreamingAtom, messagesAtom, partMapAtom, updatePart } from "./stores/chat-store.js";
|
|
133
133
|
import "./types.js";
|
|
134
134
|
import { copyText } from "./utils/copy-text.js";
|
|
135
|
-
import { formatAxisDuration, formatBytes, formatClock, formatCompact,
|
|
135
|
+
import { formatAxisDuration, formatBytes, formatClock, formatCompact, formatDuration as formatSpanDuration, formatUtcTime, plainTextFromMarkdown, truncateText } from "./utils/format.js";
|
|
136
136
|
import { timeAgo } from "./utils/time-ago.js";
|
|
137
137
|
import { TOOL_CATEGORY_ICONS, getToolCategory, getToolDisplayMetadata, getToolErrorText } from "./utils/tool-display.js";
|
|
138
138
|
import { cn } from "./lib/utils.js";
|
|
@@ -147,4 +147,4 @@ import { QuestionPreview, QuestionPreviewProps } from "./tool-previews/question-
|
|
|
147
147
|
import { DiffPreview, DiffPreviewProps } from "./tool-previews/diff-preview.js";
|
|
148
148
|
import { RedactedDocSegment, RedactedDocument, RedactedDocumentData, RedactedDocumentProps, RevealResult } from "./redaction/redacted-document.js";
|
|
149
149
|
import "./redaction.js";
|
|
150
|
-
export { ActiveProjectActivity, ActiveSessionActivityOptions, ActiveSessionConnectionOptions, ActiveSessionConnectionState, ActiveSessionReconnectState, ActiveSessionRecord, ActiveSessionStatus, ActiveSessionTransportMode, ActiveSessionsState, AgentBranding, AgentStreamEvent, 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, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTone, ApiSchema, type ApiSchemaProps, AppendUserMessageOptions, ApplySdkEventOptions, ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, ArtifactPane, type ArtifactPaneProps, AuthHeader, type AuthHeaderProps, AuthUser, AutomationStreamEvent, Avatar, AvatarFallback, AvatarImage, type AvatarProps, Badge, type BadgeProps, BeginAssistantMessageOptions, BotStreamEvent, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, type CalendarDate, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardTitleProps, type CategoryTone, type ChartReferenceLine, ChatAuthor, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, Checkbox, Chip, type ChipProps, CodeBlock, type CodeBlockProps, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, type CommandPreviewProps, CompleteAssistantMessageOptions, ComplianceBadge, type ComplianceBadgeProps, type ComplianceProduct, type ComplianceStatus, ConnectionState, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, CustomToolRenderer, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, type DiffPreviewProps, DisplayVariant, DropZone, type DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, type EventStreamHandlers, type EventStreamOpener, type EventStreamSource, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, Field, type FieldProps, FileArtifactPane, type FileArtifactPaneProps, FileCard, type FileCardProps, type FileDetails, type FileFormat, FileList, type FileListItem, type FileListProps, type FileNode, FilePreview, type FilePreviewKind, type FilePreviewProps, type FileTabData, FileTabs, type FileTabsProps, FileTree, type FileTreeProps, type FileTreeVisibilityOptions, type FileUploader, FilterField, type FilterFieldProps, FinalTextPart, GitHubLoginButton, type GitHubLoginButtonProps, GlobResultsPreview, type GlobResultsPreviewProps, GrepResultsPreview, type GrepResultsPreviewProps, GroupedMessage, Heading, type HeadingProps, type HeadingVariant, HelpText, type HelpTextProps, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, type IconTileProps, InlineCode, type InlineCodeProps, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, Input, type InputProps, Label, LiveDuration, LoginLayout, type LoginLayoutProps, Logo, type LogoProps, Markdown, type MarkdownLinkChip, type MarkdownLinkChipResolver, type MarkdownProps, MessageAuthor, type MessageAuthorProps, MessageList, type MessageListProps, type MessageRole, MessageRun, MessageUser, Metric, MetricChart, type MetricChartProps, type MetricProps, MetricStrip, type MetricStripProps, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, type OpenUIAction, type OpenUIActionsNode, OpenUIArtifactRenderer, type OpenUIArtifactRendererProps, type OpenUIBadgeNode, type OpenUICardNode, type OpenUICodeNode, type OpenUIComponentNode, type OpenUIGridNode, type OpenUIHeadingNode, type OpenUIKeyValueNode, type OpenUIMarkdownNode, type OpenUIPrimitive, type OpenUISchemaIssue, type OpenUISchemaValidation, type OpenUISeparatorNode, type OpenUIStackNode, type OpenUIStatNode, type OpenUITableNode, type OpenUITextNode, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, Pagination, type PaginationProps, PdfViewer, type PdfViewerConfig, type PdfViewerProps, type PeriodDelta, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, type QuestionPreviewProps, RadioGroup, RadioGroupItem, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, ReasoningPart, type RedactedDocSegment, RedactedDocument, type RedactedDocumentData, type RedactedDocumentProps, RegisterActiveSessionOptions, type RevealResult, RichFileTree, type RichFileTreeGitEntry, type RichFileTreeGitStatus, type RichFileTreeProps, type RichFileTreeThemeVars, Run, RunGroup, type RunGroupProps, type RunPhase, RunPhaseList, RunRowShell, type RunRowShellProps, type RunRowStatus, RunRowStatusDot, RunStats, type RunStatus, RunStatusIcon, type RunStatusIconProps, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeriesExtent, type SeriesPoint, type SeriesPointInput, type SeriesScale, SeriesSparkline, type SeriesSparklineProps, SessionMessage, SessionPart, SessionProjectKey, type SessionUser, SettingsList, type SettingsListAction, type SettingsListColumns, SettingsListItem, type SettingsListItemProps, type SettingsListMenuItem, type SettingsListProps, SettingsNote, type SettingsNoteProps, SettingsRow, type SettingsRowLayout, type SettingsRowProps, SettingsSection, type SettingsSectionProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, type SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, Slider, type Speaker, SpeakerHeader, type SpeakerHeaderProps, type SpeakerPart, type SpeakerSection, type SpeakerState, StatCard, type StatCardProps, type StatusMeta, StatusPill, type StatusPillProps, type StatusTone, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TangleKnot, TaskList, type TaskListItem, type TaskListProps, type TaskStatus, TaskStreamEvent, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TerminalStreamEvent, TextPart, TextShimmer, type TextShimmerProps, Textarea, type TextareaProps, ThemeToggle, ThinkingIndicator, type ThinkingIndicatorProps, TimeSelect, type TimeSelectProps, type Toast, ToastContainer, ToastProvider, type Tone, type ToneClasses, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, ToolCategory, ToolDisplayMetadata, ToolPart, ToolState, ToolStatus, ToolTime, Toolbar, type ToolbarProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadFile, UploadProgress, type UploadProgressProps, UseAuthOptions, UseAuthResult, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, UserMenu, type UserMenuProps, UserMessage, type UserMessageProps, WebSearchPreview, type WebSearchPreviewProps, Wizard, type WizardProps, WizardStep, type WizardStepProps, WriteFilePreview, type WriteFilePreviewProps, activeSessionsAtom, addMessage, addParts, agentTimelineStepKind, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fieldMessageId, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, foldSummary, formatAxisDuration, formatBytes, formatCalendarDate, formatClock, formatCompact, formatCost, formatCount, formatSpanDuration as formatDuration, formatSpanDuration, formatSpanDuration as formatUptime, formatUtcTime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isOpen, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, normalizeSeries, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, partitionBySpeaker, periodDelta, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, runStatus, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, statusMeta, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useEventStream, useFollowTail, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useRunNow, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
|
150
|
+
export { ActiveProjectActivity, ActiveSessionActivityOptions, ActiveSessionConnectionOptions, ActiveSessionConnectionState, ActiveSessionReconnectState, ActiveSessionRecord, ActiveSessionStatus, ActiveSessionTransportMode, ActiveSessionsState, AgentBranding, AgentStreamEvent, 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, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTone, ApiSchema, type ApiSchemaProps, AppendUserMessageOptions, ApplySdkEventOptions, ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, ArtifactPane, type ArtifactPaneProps, AuthHeader, type AuthHeaderProps, AuthUser, AutomationStreamEvent, Avatar, AvatarFallback, AvatarImage, type AvatarProps, Badge, type BadgeProps, BeginAssistantMessageOptions, BotStreamEvent, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, type CalendarDate, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardTitleProps, type CategoryTone, type ChartReferenceLine, ChatAuthor, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, Checkbox, Chip, type ChipProps, CodeBlock, type CodeBlockProps, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, type CommandPreviewProps, CompleteAssistantMessageOptions, ComplianceBadge, type ComplianceBadgeProps, type ComplianceProduct, type ComplianceStatus, ConnectionState, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, CustomToolRenderer, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, type DiffPreviewProps, DisplayVariant, DropZone, type DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, type EventStreamHandlers, type EventStreamOpener, type EventStreamSource, ExpandablePanel, type ExpandablePanelProps, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, Field, type FieldProps, FileArtifactPane, type FileArtifactPaneProps, FileCard, type FileCardProps, type FileDetails, type FileFormat, FileList, type FileListItem, type FileListProps, type FileNode, FilePreview, type FilePreviewKind, type FilePreviewProps, type FileTabData, FileTabs, type FileTabsProps, FileTree, type FileTreeProps, type FileTreeVisibilityOptions, type FileUploader, FilterField, type FilterFieldProps, FinalTextPart, GitHubLoginButton, type GitHubLoginButtonProps, GlobResultsPreview, type GlobResultsPreviewProps, GrepResultsPreview, type GrepResultsPreviewProps, GroupedMessage, Heading, type HeadingProps, type HeadingVariant, HelpText, type HelpTextProps, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, type IconTileProps, InlineCode, type InlineCodeProps, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, Input, type InputProps, Label, LoginLayout, type LoginLayoutProps, Logo, type LogoProps, Markdown, type MarkdownLinkChip, type MarkdownLinkChipResolver, type MarkdownProps, MessageAuthor, type MessageAuthorProps, MessageList, type MessageListProps, type MessageRole, MessageRun, MessageUser, Metric, MetricChart, type MetricChartProps, type MetricProps, MetricStrip, type MetricStripProps, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, type OpenUIAction, type OpenUIActionsNode, OpenUIArtifactRenderer, type OpenUIArtifactRendererProps, type OpenUIBadgeNode, type OpenUICardNode, type OpenUICodeNode, type OpenUIComponentNode, type OpenUIGridNode, type OpenUIHeadingNode, type OpenUIKeyValueNode, type OpenUIMarkdownNode, type OpenUIPrimitive, type OpenUISchemaIssue, type OpenUISchemaValidation, type OpenUISeparatorNode, type OpenUIStackNode, type OpenUIStatNode, type OpenUITableNode, type OpenUITextNode, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, Pagination, type PaginationProps, PdfViewer, type PdfViewerConfig, type PdfViewerProps, type PeriodDelta, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, type QuestionPreviewProps, RadioGroup, RadioGroupItem, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, ReasoningPart, type RedactedDocSegment, RedactedDocument, type RedactedDocumentData, type RedactedDocumentProps, RegisterActiveSessionOptions, type RevealResult, RichFileTree, type RichFileTreeGitEntry, type RichFileTreeGitStatus, type RichFileTreeProps, type RichFileTreeThemeVars, Run, RunGroup, type RunGroupProps, type RunPhase, RunPhaseList, RunRowShell, type RunRowShellProps, type RunRowStatus, RunStats, type RunStatus, RunStatusIcon, type RunStatusIconProps, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeriesExtent, type SeriesPoint, type SeriesPointInput, type SeriesScale, SeriesSparkline, type SeriesSparklineProps, SessionMessage, SessionPart, SessionProjectKey, type SessionUser, SettingsList, type SettingsListAction, type SettingsListColumns, SettingsListItem, type SettingsListItemProps, type SettingsListMenuItem, type SettingsListProps, SettingsNote, type SettingsNoteProps, SettingsRow, type SettingsRowLayout, type SettingsRowProps, SettingsSection, type SettingsSectionProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, type SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, Slider, type Speaker, SpeakerHeader, type SpeakerHeaderProps, type SpeakerPart, type SpeakerSection, type SpeakerState, StatCard, type StatCardProps, type StatusMeta, StatusPill, type StatusPillProps, type StatusTone, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TangleKnot, TaskList, type TaskListItem, type TaskListProps, type TaskStatus, TaskStreamEvent, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TerminalStreamEvent, TextPart, TextShimmer, type TextShimmerProps, Textarea, type TextareaProps, ThemeToggle, ThinkingIndicator, type ThinkingIndicatorProps, TimeSelect, type TimeSelectProps, type Toast, ToastContainer, ToastProvider, type Tone, type ToneClasses, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, ToolCategory, ToolDisplayMetadata, ToolPart, ToolState, ToolStatus, ToolTime, Toolbar, type ToolbarProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadFile, UploadProgress, type UploadProgressProps, UseAuthOptions, UseAuthResult, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, UserMenu, type UserMenuProps, UserMessage, type UserMessageProps, WebSearchPreview, type WebSearchPreviewProps, Wizard, type WizardProps, WizardStep, type WizardStepProps, WriteFilePreview, type WriteFilePreviewProps, activeSessionsAtom, addMessage, addParts, agentTimelineStepKind, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fieldMessageId, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, foldSummary, formatAxisDuration, formatBytes, formatCalendarDate, formatClock, formatCompact, formatSpanDuration as formatDuration, formatSpanDuration, formatSpanDuration as formatUptime, formatUtcTime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, normalizeSeries, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, partitionBySpeaker, periodDelta, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, runStatus, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, statusMeta, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useEventStream, useFollowTail, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useRunNow, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
package/dist/index.js
CHANGED
|
@@ -38,7 +38,7 @@ import { EmptyState } from "./primitives/empty-state.js";
|
|
|
38
38
|
import { StatCard } from "./primitives/stat-card.js";
|
|
39
39
|
import { TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine } from "./primitives/terminal-display.js";
|
|
40
40
|
import { DropZone } from "./primitives/drop-zone.js";
|
|
41
|
-
import { formatAxisDuration, formatBytes, formatClock, formatCompact,
|
|
41
|
+
import { formatAxisDuration, formatBytes, formatClock, formatCompact, formatDuration as formatSpanDuration, formatUtcTime, plainTextFromMarkdown, truncateText } from "./utils/format.js";
|
|
42
42
|
import { UploadProgress } from "./primitives/upload-progress.js";
|
|
43
43
|
import { SidebarDropZone } from "./primitives/sidebar-drop-zone.js";
|
|
44
44
|
import { ArtifactPane } from "./primitives/artifact-pane.js";
|
|
@@ -66,6 +66,7 @@ import { normalizeSeries, periodDelta, seriesAreaPath, seriesExtent, seriesLineP
|
|
|
66
66
|
import { SeriesSparkline } from "./primitives/series-sparkline.js";
|
|
67
67
|
import { MetricChart } from "./primitives/metric-chart.js";
|
|
68
68
|
import { FilterField, Toolbar } from "./primitives/toolbar.js";
|
|
69
|
+
import { ExpandablePanel } from "./primitives/expandable-panel.js";
|
|
69
70
|
import { Logo, TangleKnot } from "./primitives.js";
|
|
70
71
|
import { TOOL_CATEGORY_ICONS, getToolCategory, getToolDisplayMetadata, getToolErrorText } from "./utils/tool-display.js";
|
|
71
72
|
import { useRunGroups } from "./hooks/use-run-groups.js";
|
|
@@ -80,9 +81,9 @@ import { GlobResultsPreview } from "./tool-previews/glob-results-preview.js";
|
|
|
80
81
|
import { WebSearchPreview } from "./tool-previews/web-search-preview.js";
|
|
81
82
|
import { QuestionPreview } from "./tool-previews/question-preview.js";
|
|
82
83
|
import { DiffPreview } from "./tool-previews/diff-preview.js";
|
|
83
|
-
import { RunStatusIcon,
|
|
84
|
+
import { RunStatusIcon, runStatus, statusMeta } from "./run/status-meta.js";
|
|
84
85
|
import { ExpandedToolDetail } from "./run/expanded-tool-detail.js";
|
|
85
|
-
import { RunRowShell
|
|
86
|
+
import { RunRowShell } from "./run/run-row-shell.js";
|
|
86
87
|
import { InlineToolItem } from "./run/inline-tool-item.js";
|
|
87
88
|
import { fenceInfo } from "./markdown/code-meta.js";
|
|
88
89
|
import { numericColumns, tableCsv } from "./markdown/markdown-table.js";
|
|
@@ -101,8 +102,6 @@ import { AgentTimeline, AgentTimelineColumn, AgentTimelineStep, agentTimelineSte
|
|
|
101
102
|
import { ChatContainer } from "./chat/chat-container.js";
|
|
102
103
|
import { ChatMessage } from "./chat/chat-message.js";
|
|
103
104
|
import { SpeakerHeader, partitionBySpeaker } from "./chat/speaker.js";
|
|
104
|
-
import { useLiveTime, useRunNow } from "./hooks/use-live-time.js";
|
|
105
|
-
import { LiveDuration } from "./run/run-item-primitives.js";
|
|
106
105
|
import { ToolCallFeed, parseToolEvent } from "./run/tool-call-feed.js";
|
|
107
106
|
import { TaskList, showsTaskPriority, taskProgress, taskStatus } from "./run/task-list.js";
|
|
108
107
|
import { ApprovalCard, ApprovalDiffSummary } from "./run/approval-card.js";
|
|
@@ -120,6 +119,7 @@ import { ApiSchema } from "./markdown/api-schema.js";
|
|
|
120
119
|
import { AuthHeader, GitHubLoginButton, UserMenu } from "./auth/auth.js";
|
|
121
120
|
import { LoginLayout } from "./auth/login-layout.js";
|
|
122
121
|
import { useDropdownMenu } from "./hooks/use-dropdown-menu.js";
|
|
122
|
+
import { useLiveTime, useRunNow } from "./hooks/use-live-time.js";
|
|
123
123
|
import { useToolCallStream } from "./hooks/use-tool-call-stream.js";
|
|
124
124
|
import { createAuthFetcher, useApiKey, useAuth } from "./hooks/use-auth.js";
|
|
125
125
|
import { activeSessionsAtom, bumpActiveSessionActivity, getActiveSession, getAllActiveSessions, getAllProjectActivity, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getTotalRunningSessionCount, hasBackgroundRunningSessions, registerActiveSession, resetActiveSessions, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, unregisterActiveSession, updateActiveSessionMeta, useActiveSession, useActiveSessions, useActiveSessionsState, useHasBackgroundRunningSessions, useNavbarSessions, useProjectActivity, useProjectSessions, useSessionsByActivity, useTotalRunningSessions } from "./stores/active-sessions-store.js";
|
|
@@ -131,4 +131,4 @@ import { addMessage, addParts, clearChat, isStreamingAtom, messagesAtom, partMap
|
|
|
131
131
|
import { copyText } from "./utils/copy-text.js";
|
|
132
132
|
import { timeAgo } from "./utils/time-ago.js";
|
|
133
133
|
import { RedactedDocument } from "./redaction/redacted-document.js";
|
|
134
|
-
export { AgentTimeline, AgentTimelineColumn, AgentTimelineStep, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, ApiSchema, ApprovalCard, ApprovalDiffSummary, ArtifactPane, AuthHeader, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatContainer, ChatMessage, Checkbox, Chip, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, ComplianceBadge, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, DropZone, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ExpandedToolDetail, Field, FileArtifactPane, FileCard, FileList, FilePreview, FileTabs, FileTree, FilterField, GitHubLoginButton, GlobResultsPreview, GrepResultsPreview, Heading, HelpText, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, InlineCode, InlineThinkingItem, InlineToolItem, Input, Label,
|
|
134
|
+
export { AgentTimeline, AgentTimelineColumn, AgentTimelineStep, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, ApiSchema, ApprovalCard, ApprovalDiffSummary, ArtifactPane, AuthHeader, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatContainer, ChatMessage, Checkbox, Chip, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, ComplianceBadge, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, DropZone, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ExpandablePanel, ExpandedToolDetail, Field, FileArtifactPane, FileCard, FileList, FilePreview, FileTabs, FileTree, FilterField, GitHubLoginButton, GlobResultsPreview, GrepResultsPreview, Heading, HelpText, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, InlineCode, InlineThinkingItem, InlineToolItem, Input, Label, LoginLayout, Logo, Markdown, MessageAuthor, MessageList, Metric, MetricChart, MetricStrip, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, PageHeader, PageShell, Pagination, PdfViewer, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, RadioGroup, RadioGroupItem, RealtimeSessionRegistry, RedactedDocument, RichFileTree, RunGroup, RunPhaseList, RunRowShell, RunStatusIcon, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeriesSparkline, SettingsList, SettingsListItem, SettingsNote, SettingsRow, SettingsSection, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, Skeleton, SkeletonCard, SkeletonTable, Slider, SpeakerHeader, StatCard, StatusPill, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TangleKnot, TaskList, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, Textarea, ThemeToggle, ThinkingIndicator, TimeSelect, ToastContainer, ToastProvider, ToolCallFeed, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UploadProgress, UserMenu, UserMessage, WebSearchPreview, Wizard, WizardStep, WriteFilePreview, activeSessionsAtom, addMessage, addParts, agentTimelineStepKind, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fieldMessageId, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, foldSummary, formatAxisDuration, formatBytes, formatCalendarDate, formatClock, formatCompact, formatSpanDuration as formatDuration, formatSpanDuration, formatSpanDuration as formatUptime, formatUtcTime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, normalizeSeries, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, partitionBySpeaker, periodDelta, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, runStatus, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, statusMeta, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useEventStream, useFollowTail, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useRunNow, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
export interface ExpandablePanelProps {
|
|
3
|
+
children?: React.ReactNode;
|
|
4
|
+
/** Accessible name: the toggle reads "Expand <label>" and "Close full screen <label>". */
|
|
5
|
+
label: string;
|
|
6
|
+
expanded?: boolean;
|
|
7
|
+
onExpandedChange?: (expanded: boolean) => void;
|
|
8
|
+
className?: string;
|
|
9
|
+
actions?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A panel that fills the viewport in place and returns on Escape. The subtree
|
|
13
|
+
* never moves (no portal), so chart, canvas and conversation state and scroll
|
|
14
|
+
* survive the switch. Radix popovers, menus and dialogs inside take Escape
|
|
15
|
+
* first: they prevent its default, which this panel respects. An ancestor
|
|
16
|
+
* with a transform or filter would contain the fixed panel, so avoid one.
|
|
17
|
+
*/
|
|
18
|
+
declare function ExpandablePanel({ children, label, expanded: expandedProp, onExpandedChange, className, actions }: ExpandablePanelProps): React.JSX.Element;
|
|
19
|
+
export { ExpandablePanel };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../lib/utils.js";
|
|
3
|
+
import { Button } from "./button.js";
|
|
4
|
+
import * as React from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { Maximize2, Minimize2 } from "lucide-react";
|
|
7
|
+
// src/primitives/expandable-panel.tsx
|
|
8
|
+
const openPanels = [];
|
|
9
|
+
let bodyOverflow = "";
|
|
10
|
+
/**
|
|
11
|
+
* A panel that fills the viewport in place and returns on Escape. The subtree
|
|
12
|
+
* never moves (no portal), so chart, canvas and conversation state and scroll
|
|
13
|
+
* survive the switch. Radix popovers, menus and dialogs inside take Escape
|
|
14
|
+
* first: they prevent its default, which this panel respects. An ancestor
|
|
15
|
+
* with a transform or filter would contain the fixed panel, so avoid one.
|
|
16
|
+
*/
|
|
17
|
+
function ExpandablePanel({ children, label, expanded: expandedProp, onExpandedChange, className, actions }) {
|
|
18
|
+
const [expandedState, setExpandedState] = React.useState(false);
|
|
19
|
+
const expanded = expandedProp ?? expandedState;
|
|
20
|
+
const toggleRef = React.useRef(null);
|
|
21
|
+
const panelRef = React.useRef(null);
|
|
22
|
+
const wasExpanded = React.useRef(expanded);
|
|
23
|
+
const setExpanded = (next) => {
|
|
24
|
+
if (expandedProp === void 0) setExpandedState(next);
|
|
25
|
+
onExpandedChange?.(next);
|
|
26
|
+
};
|
|
27
|
+
const setExpandedRef = React.useRef(setExpanded);
|
|
28
|
+
setExpandedRef.current = setExpanded;
|
|
29
|
+
React.useEffect(() => {
|
|
30
|
+
if (wasExpanded.current && !expanded) toggleRef.current?.focus();
|
|
31
|
+
wasExpanded.current = expanded;
|
|
32
|
+
const id = panelRef.current;
|
|
33
|
+
if (!expanded || !id) return;
|
|
34
|
+
if (openPanels.length === 0) bodyOverflow = document.body.style.overflow;
|
|
35
|
+
openPanels.push(id);
|
|
36
|
+
document.body.style.overflow = "hidden";
|
|
37
|
+
const onKeyDown = (event) => {
|
|
38
|
+
const top = openPanels.filter((p) => !openPanels.some((q) => q !== p && p.contains(q))).pop();
|
|
39
|
+
if (event.key !== "Escape" || event.defaultPrevented || top !== id) return;
|
|
40
|
+
event.preventDefault();
|
|
41
|
+
setExpandedRef.current(false);
|
|
42
|
+
};
|
|
43
|
+
document.addEventListener("keydown", onKeyDown);
|
|
44
|
+
return () => {
|
|
45
|
+
document.removeEventListener("keydown", onKeyDown);
|
|
46
|
+
openPanels.splice(openPanels.indexOf(id), 1);
|
|
47
|
+
if (openPanels.length === 0) document.body.style.overflow = bodyOverflow;
|
|
48
|
+
};
|
|
49
|
+
}, [expanded]);
|
|
50
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
51
|
+
ref: panelRef,
|
|
52
|
+
"data-expandable-panel": "",
|
|
53
|
+
"data-expanded": expanded ? "" : void 0,
|
|
54
|
+
className: cn("group/expandable relative flex min-h-0 flex-col", className, expanded && "fixed inset-0 z-50 m-0 size-auto min-h-0 min-w-0 max-h-none max-w-none rounded-none transform-none bg-background"),
|
|
55
|
+
children: [children, /* @__PURE__ */ jsxs("div", {
|
|
56
|
+
className: cn("absolute right-2 top-2 z-10 flex items-center gap-1 transition-opacity", expanded ? "opacity-100" : "opacity-0 group-hover/expandable:opacity-100 group-focus-within/expandable:opacity-100 pointer-coarse:opacity-100"),
|
|
57
|
+
children: [actions, /* @__PURE__ */ jsx(Button, {
|
|
58
|
+
ref: toggleRef,
|
|
59
|
+
type: "button",
|
|
60
|
+
variant: "ghost",
|
|
61
|
+
size: "icon-sm",
|
|
62
|
+
"aria-label": `${expanded ? "Close full screen" : "Expand"} ${label}`,
|
|
63
|
+
onClick: () => setExpanded(!expanded),
|
|
64
|
+
children: expanded ? /* @__PURE__ */ jsx(Minimize2, { "aria-hidden": true }) : /* @__PURE__ */ jsx(Maximize2, { "aria-hidden": true })
|
|
65
|
+
})]
|
|
66
|
+
})]
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
export { ExpandablePanel };
|
package/dist/primitives.d.ts
CHANGED
|
@@ -61,5 +61,6 @@ import { PeriodDelta, SeriesExtent, SeriesPoint, SeriesPointInput, SeriesScale,
|
|
|
61
61
|
import { SeriesSparkline, SeriesSparklineProps } from "./primitives/series-sparkline.js";
|
|
62
62
|
import { ChartReferenceLine, MetricChart, MetricChartProps } from "./primitives/metric-chart.js";
|
|
63
63
|
import { FilterField, FilterFieldProps, Toolbar, ToolbarProps } from "./primitives/toolbar.js";
|
|
64
|
+
import { ExpandablePanel, ExpandablePanelProps } from "./primitives/expandable-panel.js";
|
|
64
65
|
import { Logo, LogoProps, TangleKnot } from "@tangle-network/brand";
|
|
65
|
-
export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTone, ArtifactPane, type ArtifactPaneProps, Avatar, AvatarFallback, AvatarImage, type AvatarProps, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, CATEGORY_TONES, Calendar, type CalendarDate, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardTitleProps, type CategoryTone, type ChartReferenceLine, Checkbox, Chip, type ChipProps, CodeBlock, type CodeBlockProps, Collapsible, CollapsibleContent, CollapsibleTrigger, ComplianceBadge, type ComplianceBadgeProps, type ComplianceProduct, type ComplianceStatus, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, DatePicker, type DatePickerProps, 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, Field, type FieldProps, FilterField, type FilterFieldProps, Heading, type HeadingProps, type HeadingVariant, HelpText, type HelpTextProps, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, type IconTileProps, InlineCode, type InlineCodeProps, Input, type InputProps, Label, Logo, type LogoProps, Metric, MetricChart, type MetricChartProps, type MetricProps, MetricStrip, type MetricStripProps, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, Pagination, type PaginationProps, type PeriodDelta, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeriesExtent, type SeriesPoint, type SeriesPointInput, type SeriesScale, SeriesSparkline, type SeriesSparklineProps, SettingsList, type SettingsListAction, type SettingsListColumns, SettingsListItem, type SettingsListItemProps, type SettingsListMenuItem, type SettingsListProps, SettingsNote, type SettingsNoteProps, SettingsRow, type SettingsRowLayout, type SettingsRowProps, SettingsSection, type SettingsSectionProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, type SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, Slider, StatCard, type StatCardProps, StatusPill, type StatusPillProps, type StatusTone, Switch, TONE_CLASSES, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TangleKnot, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, type TextShimmerProps, Textarea, type TextareaProps, ThemeToggle, TimeSelect, type TimeSelectProps, type Toast, ToastContainer, ToastProvider, type Tone, type ToneClasses, Toolbar, type ToolbarProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadFile, UploadProgress, type UploadProgressProps, Wizard, type WizardProps, WizardStep, type WizardStepProps, badgeVariants, buttonVariants, fieldMessageId, formatCalendarDate, initialsOf, localToday, normalizeSeries, parseCalendarDate, periodDelta, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, toneFor, useTheme, useToast };
|
|
66
|
+
export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTone, ArtifactPane, type ArtifactPaneProps, Avatar, AvatarFallback, AvatarImage, type AvatarProps, Badge, type BadgeProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, CATEGORY_TONES, Calendar, type CalendarDate, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardTitleProps, type CategoryTone, type ChartReferenceLine, Checkbox, Chip, type ChipProps, CodeBlock, type CodeBlockProps, Collapsible, CollapsibleContent, CollapsibleTrigger, ComplianceBadge, type ComplianceBadgeProps, type ComplianceProduct, type ComplianceStatus, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, DatePicker, type DatePickerProps, 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, ExpandablePanel, type ExpandablePanelProps, Field, type FieldProps, FilterField, type FilterFieldProps, Heading, type HeadingProps, type HeadingVariant, HelpText, type HelpTextProps, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, type IconTileProps, InlineCode, type InlineCodeProps, Input, type InputProps, Label, Logo, type LogoProps, Metric, MetricChart, type MetricChartProps, type MetricProps, MetricStrip, type MetricStripProps, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, Pagination, type PaginationProps, type PeriodDelta, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, type SeriesExtent, type SeriesPoint, type SeriesPointInput, type SeriesScale, SeriesSparkline, type SeriesSparklineProps, SettingsList, type SettingsListAction, type SettingsListColumns, SettingsListItem, type SettingsListItemProps, type SettingsListMenuItem, type SettingsListProps, SettingsNote, type SettingsNoteProps, SettingsRow, type SettingsRowLayout, type SettingsRowProps, SettingsSection, type SettingsSectionProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, type SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, Slider, StatCard, type StatCardProps, StatusPill, type StatusPillProps, type StatusTone, Switch, TONE_CLASSES, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TangleKnot, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, type TextShimmerProps, Textarea, type TextareaProps, ThemeToggle, TimeSelect, type TimeSelectProps, type Toast, ToastContainer, ToastProvider, type Tone, type ToneClasses, Toolbar, type ToolbarProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadFile, UploadProgress, type UploadProgressProps, Wizard, type WizardProps, WizardStep, type WizardStepProps, badgeVariants, buttonVariants, fieldMessageId, formatCalendarDate, initialsOf, localToday, normalizeSeries, parseCalendarDate, periodDelta, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, toneFor, useTheme, useToast };
|
package/dist/primitives.js
CHANGED
|
@@ -61,5 +61,6 @@ import { normalizeSeries, periodDelta, seriesAreaPath, seriesExtent, seriesLineP
|
|
|
61
61
|
import { SeriesSparkline } from "./primitives/series-sparkline.js";
|
|
62
62
|
import { MetricChart } from "./primitives/metric-chart.js";
|
|
63
63
|
import { FilterField, Toolbar } from "./primitives/toolbar.js";
|
|
64
|
+
import { ExpandablePanel } from "./primitives/expandable-panel.js";
|
|
64
65
|
import { Logo, TangleKnot } from "@tangle-network/brand";
|
|
65
|
-
export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, ArtifactPane, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CATEGORY_TONES, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Chip, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, ComplianceBadge, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropZone, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, Field, FilterField, Heading, HelpText, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, InlineCode, Input, Label, Logo, Metric, MetricChart, MetricStrip, PageHeader, PageShell, Pagination, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeriesSparkline, SettingsList, SettingsListItem, SettingsNote, SettingsRow, SettingsSection, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, Skeleton, SkeletonCard, SkeletonTable, Slider, StatCard, StatusPill, Switch, TONE_CLASSES, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TangleKnot, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, Textarea, ThemeToggle, TimeSelect, ToastContainer, ToastProvider, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UploadProgress, Wizard, WizardStep, badgeVariants, buttonVariants, fieldMessageId, formatCalendarDate, initialsOf, localToday, normalizeSeries, parseCalendarDate, periodDelta, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, toneFor, useTheme, useToast };
|
|
66
|
+
export { Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, ArtifactPane, Avatar, AvatarFallback, AvatarImage, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, CATEGORY_TONES, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Checkbox, Chip, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, ComplianceBadge, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropZone, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ExpandablePanel, Field, FilterField, Heading, HelpText, HoverCard, HoverCardContent, HoverCardDescription, HoverCardHeader, HoverCardTitle, HoverCardTrigger, IconTile, InlineCode, Input, Label, Logo, Metric, MetricChart, MetricStrip, PageHeader, PageShell, Pagination, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, RadioGroup, RadioGroupItem, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SeriesSparkline, SettingsList, SettingsListItem, SettingsNote, SettingsRow, SettingsSection, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, Skeleton, SkeletonCard, SkeletonTable, Slider, StatCard, StatusPill, Switch, TONE_CLASSES, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TangleKnot, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, Textarea, ThemeToggle, TimeSelect, ToastContainer, ToastProvider, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UploadProgress, Wizard, WizardStep, badgeVariants, buttonVariants, fieldMessageId, formatCalendarDate, initialsOf, localToday, normalizeSeries, parseCalendarDate, periodDelta, seriesAreaPath, seriesExtent, seriesLinePath, seriesMean, seriesScale, toneFor, useTheme, useToast };
|
|
@@ -1,14 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
2
|
export type RunRowStatus = "running" | "success" | "error" | "idle";
|
|
3
|
-
/**
|
|
4
|
-
* A red dot for a failed row, for rows composed outside the shell. The shell
|
|
5
|
-
* itself marks a failure on the row's own glyph, beside its name, never at the
|
|
6
|
-
* far edge. Success is silence, and a running row carries its state in the
|
|
7
|
-
* title — a `TextShimmer` sweep.
|
|
8
|
-
*/
|
|
9
|
-
export declare function RunRowStatusDot({ status }: {
|
|
10
|
-
status: RunRowStatus;
|
|
11
|
-
}): import("react").JSX.Element | null;
|
|
12
3
|
export interface RunRowShellProps {
|
|
13
4
|
/** Semantic lead glyph (14px). At rest it is the row's only ornament; on
|
|
14
5
|
* hover and while open the expand chevron takes its slot. */
|
|
@@ -22,10 +13,6 @@ export interface RunRowShellProps {
|
|
|
22
13
|
/** Render the description in mono (tools) vs prose (reasoning). */
|
|
23
14
|
descriptionMono?: boolean;
|
|
24
15
|
status?: RunRowStatus;
|
|
25
|
-
/** @deprecated The shell no longer ticks a live duration while running; the
|
|
26
|
-
* running state lives in the title (`TextShimmer`). Accepted and ignored so
|
|
27
|
-
* existing callers keep compiling. */
|
|
28
|
-
startTime?: number;
|
|
29
16
|
/** Static duration, revealed on hover once the row is no longer running. */
|
|
30
17
|
durationMs?: number;
|
|
31
18
|
/** Radius shaping when rows are stacked into a group. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { focusRingInset } from "../lib/focus.js";
|
|
1
2
|
import { cn } from "../lib/utils.js";
|
|
2
3
|
import { formatDuration as formatSpanDuration } from "../utils/format.js";
|
|
3
4
|
import { useState } from "react";
|
|
@@ -5,19 +6,6 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
5
6
|
import { ChevronRight } from "lucide-react";
|
|
6
7
|
import * as Collapsible from "@radix-ui/react-collapsible";
|
|
7
8
|
// src/run/run-row-shell.tsx
|
|
8
|
-
/**
|
|
9
|
-
* A red dot for a failed row, for rows composed outside the shell. The shell
|
|
10
|
-
* itself marks a failure on the row's own glyph, beside its name, never at the
|
|
11
|
-
* far edge. Success is silence, and a running row carries its state in the
|
|
12
|
-
* title — a `TextShimmer` sweep.
|
|
13
|
-
*/
|
|
14
|
-
function RunRowStatusDot({ status }) {
|
|
15
|
-
if (status !== "error") return null;
|
|
16
|
-
return /* @__PURE__ */ jsx("span", {
|
|
17
|
-
"data-run-row-status": "error",
|
|
18
|
-
className: "h-1.5 w-1.5 shrink-0 rounded-full bg-[var(--surface-danger-text)]"
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
9
|
const SHAPE_CLASS = {
|
|
22
10
|
single: "rounded-[var(--radius-lg)]",
|
|
23
11
|
first: "rounded-t-[var(--radius-lg)] rounded-b-[var(--radius-sm)]",
|
|
@@ -58,7 +46,7 @@ function RunRowShell({ icon, title, description, descriptionMono = false, status
|
|
|
58
46
|
disabled: !expandable,
|
|
59
47
|
children: /* @__PURE__ */ jsxs("button", {
|
|
60
48
|
type: "button",
|
|
61
|
-
className: cn("group flex w-full items-center gap-2 text-left", HEADER_INSET, expandable ? "cursor-pointer" : "cursor-default"),
|
|
49
|
+
className: cn(focusRingInset, "group flex w-full items-center gap-2 text-left", HEADER_INSET, expandable ? "cursor-pointer" : "cursor-default"),
|
|
62
50
|
children: [
|
|
63
51
|
/* @__PURE__ */ jsxs("span", {
|
|
64
52
|
"aria-hidden": true,
|
|
@@ -109,4 +97,4 @@ function RunRowShell({ icon, title, description, descriptionMono = false, status
|
|
|
109
97
|
})
|
|
110
98
|
});
|
|
111
99
|
}
|
|
112
|
-
export { RunRowShell
|
|
100
|
+
export { RunRowShell };
|
|
@@ -11,8 +11,6 @@ export interface StatusMeta {
|
|
|
11
11
|
}
|
|
12
12
|
/** Any status string as a `RunStatus`; a value nothing names reads as Unknown, never as a guess. */
|
|
13
13
|
export declare function runStatus(status: string): RunStatus;
|
|
14
|
-
/** Whether a canonical run state can still advance. */
|
|
15
|
-
export declare const isOpen: (status: RunStatus | (string & {})) => boolean;
|
|
16
14
|
/** The label, glyph and colour token for a status, in every surface. */
|
|
17
15
|
export declare function statusMeta(status: RunStatus | (string & {})): StatusMeta;
|
|
18
16
|
export interface RunStatusIconProps extends Omit<LucideProps, "ref"> {
|
package/dist/run/status-meta.js
CHANGED
|
@@ -78,12 +78,6 @@ function runStatus(status) {
|
|
|
78
78
|
if (Object.hasOwn(META, key)) return key;
|
|
79
79
|
return Object.hasOwn(ALIASES, key) ? ALIASES[key] : "unknown";
|
|
80
80
|
}
|
|
81
|
-
/** Whether a canonical run state can still advance. */
|
|
82
|
-
const isOpen = (status) => [
|
|
83
|
-
"running",
|
|
84
|
-
"waiting",
|
|
85
|
-
"needs-you"
|
|
86
|
-
].includes(runStatus(status));
|
|
87
81
|
/** The label, glyph and colour token for a status, in every surface. */
|
|
88
82
|
function statusMeta(status) {
|
|
89
83
|
return META[runStatus(status)];
|
|
@@ -113,4 +107,4 @@ function RunStatusIcon({ status, className, style, ...props }) {
|
|
|
113
107
|
...props
|
|
114
108
|
});
|
|
115
109
|
}
|
|
116
|
-
export { RunStatusIcon,
|
|
110
|
+
export { RunStatusIcon, runStatus, statusMeta };
|
package/dist/run.d.ts
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { ToolCallStatus, ToolCallType } from "./run/tool-call-step.js";
|
|
2
2
|
import { FeedSegment, ToolCallData, ToolCallFeed, ToolCallFeedProps, parseToolEvent } from "./run/tool-call-feed.js";
|
|
3
3
|
import { RunGroup, RunGroupProps } from "./run/run-group.js";
|
|
4
|
-
import { RunRowShell, RunRowShellProps, RunRowStatus
|
|
4
|
+
import { RunRowShell, RunRowShellProps, RunRowStatus } from "./run/run-row-shell.js";
|
|
5
5
|
import { InlineToolItem, InlineToolItemProps } from "./run/inline-tool-item.js";
|
|
6
6
|
import { InlineThinkingItem, InlineThinkingItemProps } from "./run/inline-thinking-item.js";
|
|
7
7
|
import { ExpandedToolDetail, ExpandedToolDetailProps } from "./run/expanded-tool-detail.js";
|
|
8
|
-
import { LiveDuration } from "./run/run-item-primitives.js";
|
|
9
8
|
import { TaskList, TaskListItem, TaskListProps, TaskStatus, showsTaskPriority, taskProgress, taskStatus } from "./run/task-list.js";
|
|
10
9
|
import { ApprovalCard, ApprovalCardProps, ApprovalDiffFile, ApprovalDiffSummary, ApprovalPlanStep } from "./run/approval-card.js";
|
|
11
10
|
import { RunPhase, RunPhaseList } from "./run/run-phase-list.js";
|
|
12
|
-
import { RunStatus, RunStatusIcon, RunStatusIconProps, StatusMeta,
|
|
13
|
-
export { ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps,
|
|
11
|
+
import { RunStatus, RunStatusIcon, RunStatusIconProps, StatusMeta, runStatus, statusMeta } from "./run/status-meta.js";
|
|
12
|
+
export { ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, RunGroup, type RunGroupProps, type RunPhase, RunPhaseList, RunRowShell, type RunRowShellProps, type RunRowStatus, type RunStatus, RunStatusIcon, type RunStatusIconProps, type StatusMeta, TaskList, type TaskListItem, type TaskListProps, type TaskStatus, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, parseToolEvent, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus };
|
package/dist/run.js
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { RunStatusIcon,
|
|
1
|
+
import { RunStatusIcon, runStatus, statusMeta } from "./run/status-meta.js";
|
|
2
2
|
import { ExpandedToolDetail } from "./run/expanded-tool-detail.js";
|
|
3
|
-
import { RunRowShell
|
|
3
|
+
import { RunRowShell } from "./run/run-row-shell.js";
|
|
4
4
|
import { InlineToolItem } from "./run/inline-tool-item.js";
|
|
5
5
|
import { InlineThinkingItem } from "./run/inline-thinking-item.js";
|
|
6
6
|
import { RunGroup } from "./run/run-group.js";
|
|
7
|
-
import { LiveDuration } from "./run/run-item-primitives.js";
|
|
8
7
|
import { ToolCallFeed, parseToolEvent } from "./run/tool-call-feed.js";
|
|
9
8
|
import { TaskList, showsTaskPriority, taskProgress, taskStatus } from "./run/task-list.js";
|
|
10
9
|
import { ApprovalCard, ApprovalDiffSummary } from "./run/approval-card.js";
|
|
11
10
|
import { RunPhaseList } from "./run/run-phase-list.js";
|
|
12
|
-
export { ApprovalCard, ApprovalDiffSummary, ExpandedToolDetail, InlineThinkingItem, InlineToolItem,
|
|
11
|
+
export { ApprovalCard, ApprovalDiffSummary, ExpandedToolDetail, InlineThinkingItem, InlineToolItem, RunGroup, RunPhaseList, RunRowShell, RunStatusIcon, TaskList, ToolCallFeed, parseToolEvent, runStatus, showsTaskPriority, statusMeta, taskProgress, taskStatus };
|
package/dist/utils/format.d.ts
CHANGED
|
@@ -17,10 +17,6 @@ export declare function formatAxisDuration(ms: number): string;
|
|
|
17
17
|
export declare const formatCompact: (value: number | null | undefined) => string;
|
|
18
18
|
/** Span milliseconds, tenths below ten seconds, then seconds/minutes; days stay compact. */
|
|
19
19
|
export declare function formatSpanDuration(ms: number): string;
|
|
20
|
-
/** $0.12, $0.005, $12.40; never rounds a recorded nonzero cost to $0.00. */
|
|
21
|
-
export declare function formatCost(usd: number): string;
|
|
22
|
-
/** 9.8k, 754.4k, 1.2M with the exact count left to a title. */
|
|
23
|
-
export declare function formatCount(n: number): string;
|
|
24
20
|
/** Elapsed clock at millisecond precision, so zoomed axis ticks keep distinct labels. */
|
|
25
21
|
export declare function formatClock(ms: number): string;
|
|
26
22
|
/** Normalize labels to UTC without rewriting the source timestamp. */
|
package/dist/utils/format.js
CHANGED
|
@@ -49,17 +49,6 @@ function formatSpanDuration(ms) {
|
|
|
49
49
|
const precision = ms < 1e4 ? 100 : ms < 36e5 ? 1e3 : 6e4;
|
|
50
50
|
return ms >= 864e5 ? formatAxisDuration(ms) : ms < 1e3 ? `${Math.round(ms)}ms` : formatClock(Math.round(ms / precision) * precision);
|
|
51
51
|
}
|
|
52
|
-
/** $0.12, $0.005, $12.40; never rounds a recorded nonzero cost to $0.00. */
|
|
53
|
-
function formatCost(usd) {
|
|
54
|
-
if (!Number.isFinite(usd) || usd < 0) return "—";
|
|
55
|
-
if (usd === 0) return "$0.00";
|
|
56
|
-
if (usd < .01) return `$${usd.toPrecision(1)}`;
|
|
57
|
-
return `$${usd.toFixed(2)}`;
|
|
58
|
-
}
|
|
59
|
-
/** 9.8k, 754.4k, 1.2M with the exact count left to a title. */
|
|
60
|
-
function formatCount(n) {
|
|
61
|
-
return !Number.isSafeInteger(n) || n < 0 ? "—" : formatCompact(n);
|
|
62
|
-
}
|
|
63
52
|
/** Elapsed clock at millisecond precision, so zoomed axis ticks keep distinct labels. */
|
|
64
53
|
function formatClock(ms) {
|
|
65
54
|
if (!Number.isFinite(ms) || ms < 0) return "—";
|
|
@@ -78,4 +67,4 @@ function formatUtcTime(value, includeDate = false) {
|
|
|
78
67
|
const iso = date.toISOString();
|
|
79
68
|
return `${includeDate ? iso.slice(0, 19).replace("T", " ") : iso.slice(11, 19)} UTC`;
|
|
80
69
|
}
|
|
81
|
-
export { formatAxisDuration, formatBytes, formatClock, formatCompact,
|
|
70
|
+
export { formatAxisDuration, formatBytes, formatClock, formatCompact, formatSpanDuration as formatDuration, formatSpanDuration, formatSpanDuration as formatUptime, formatUtcTime, plainTextFromMarkdown, truncateText };
|
package/dist/utils.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline } from "./lib/interaction.js";
|
|
2
2
|
import { copyText } from "./utils/copy-text.js";
|
|
3
|
-
import { formatAxisDuration, formatBytes, formatClock, formatCompact,
|
|
3
|
+
import { formatAxisDuration, formatBytes, formatClock, formatCompact, formatDuration as formatSpanDuration, formatUtcTime, plainTextFromMarkdown, truncateText } from "./utils/format.js";
|
|
4
4
|
import { timeAgo } from "./utils/time-ago.js";
|
|
5
5
|
import { TOOL_CATEGORY_ICONS, getToolCategory, getToolDisplayMetadata, getToolErrorText } from "./utils/tool-display.js";
|
|
6
6
|
import { cn } from "./lib/utils.js";
|
|
7
7
|
import { focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset } from "./lib/focus.js";
|
|
8
|
-
export { TOOL_CATEGORY_ICONS, cn, copyText, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, formatAxisDuration, formatBytes, formatClock, formatCompact,
|
|
8
|
+
export { TOOL_CATEGORY_ICONS, cn, copyText, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, formatAxisDuration, formatBytes, formatClock, formatCompact, formatSpanDuration as formatDuration, formatSpanDuration, formatSpanDuration as formatUptime, formatUtcTime, getToolCategory, getToolDisplayMetadata, getToolErrorText, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, plainTextFromMarkdown, timeAgo, truncateText };
|
package/dist/utils.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline } from "./lib/interaction.js";
|
|
2
2
|
import { focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset } from "./lib/focus.js";
|
|
3
3
|
import { cn } from "./lib/utils.js";
|
|
4
|
-
import { formatAxisDuration, formatBytes, formatClock, formatCompact,
|
|
4
|
+
import { formatAxisDuration, formatBytes, formatClock, formatCompact, formatDuration as formatSpanDuration, formatUtcTime, plainTextFromMarkdown, truncateText } from "./utils/format.js";
|
|
5
5
|
import { TOOL_CATEGORY_ICONS, getToolCategory, getToolDisplayMetadata, getToolErrorText } from "./utils/tool-display.js";
|
|
6
6
|
import { copyText } from "./utils/copy-text.js";
|
|
7
7
|
import { timeAgo } from "./utils/time-ago.js";
|
|
8
|
-
export { TOOL_CATEGORY_ICONS, cn, copyText, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, formatAxisDuration, formatBytes, formatClock, formatCompact,
|
|
8
|
+
export { TOOL_CATEGORY_ICONS, cn, copyText, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, formatAxisDuration, formatBytes, formatClock, formatCompact, formatSpanDuration as formatDuration, formatSpanDuration, formatSpanDuration as formatUptime, formatUtcTime, getToolCategory, getToolDisplayMetadata, getToolErrorText, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, plainTextFromMarkdown, timeAgo, truncateText };
|
package/package.json
CHANGED
|
@@ -95,7 +95,7 @@ export function ChatMessage({
|
|
|
95
95
|
className={cn(
|
|
96
96
|
"min-w-0 max-w-[85%] space-y-1",
|
|
97
97
|
fromViewer
|
|
98
|
-
? "rounded-[var(--radius-lg)] bg-
|
|
98
|
+
? "rounded-[var(--radius-lg)] bg-primary/15 px-[var(--chat-message-px)] py-[var(--chat-message-py)] text-foreground"
|
|
99
99
|
: fromOtherPerson
|
|
100
100
|
? "rounded-[var(--radius-lg)] border border-border bg-card px-[var(--chat-message-px)] py-[var(--chat-message-py)] text-foreground"
|
|
101
101
|
: isAssistant
|