@tangle-network/sandbox-ui 0.86.0 → 0.87.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/dist/chat.d.ts CHANGED
@@ -331,6 +331,13 @@ interface AgentComposerMention {
331
331
  renderItem?: (item: MentionItem) => React.ReactNode;
332
332
  /** Shown when a fetch resolves to zero items. Default "No matches". */
333
333
  emptyText?: string;
334
+ /**
335
+ * Extra classes merged onto the suggestion popover's root element
336
+ * (`role="listbox"`), applied last so they win over the component's own —
337
+ * the supported way to retheme the popover instead of targeting it by its
338
+ * ARIA attributes.
339
+ */
340
+ popoverClassName?: string;
334
341
  }
335
342
  /** A staged attachment shown as a chip above the input. */
336
343
  interface ComposerFile {
@@ -465,6 +472,17 @@ interface AgentComposerProps {
465
472
  */
466
473
  declare function AgentComposer({ value, onChange, onSubmit, placeholder, disabled, busy, onCancel, harness, profile, model, reasoning, context, controls, trailing, onAttach, onAttachFolder, attachments, onRemoveFile, onRetryFile, accept, onRejectFiles, dropTitle, dropDescription, canSubmitWhileBusy, canSubmitAttachmentsOnly, mention, focusShortcut, minRows, maxHeight, className, sendLabel, autoFocus, }: AgentComposerProps): react_jsx_runtime.JSX.Element;
467
474
 
475
+ /**
476
+ * Visual contract for a rendered mention pill. The TipTap editor extension in
477
+ * `mention-editor.tsx` styles its inline atom node with this, and any other
478
+ * surface that renders a resolved mention (e.g. a sent-message transcript)
479
+ * should use the same constant so the two stay one visual contract instead of
480
+ * silently drifting apart. Kept in its own module (no TipTap import) so
481
+ * importing it never pulls the lazily-loaded editor chunk into a consumer's
482
+ * bundle.
483
+ */
484
+ declare const MENTION_PILL_CLASS: string;
485
+
468
486
  /**
469
487
  * Whether `harness` can run `modelId`. Router-backed harnesses, and provider-less
470
488
  * sentinel ids (like "default" or an empty selection — "the session's own
@@ -577,4 +595,4 @@ declare function createFetchTransport(opts: {
577
595
  fetchImpl?: typeof fetch;
578
596
  }): ArtifactAgentDockTransport;
579
597
 
580
- export { AgentComposer, type AgentComposerMention, type AgentComposerProps, type AgentProfileCapability, type AgentProfileDraft, type AgentProfileOption, AgentProfilePicker, type AgentProfilePickerProps, AgentSessionControls, type AgentSessionControlsProps, type AgentSessionHarnessControl, type AgentSessionModelControl, type AgentSessionProfileControl, type AgentSessionReasoningControl, ArtifactAgentDock, type ArtifactAgentDockProps, type ArtifactAgentDockTransport, type ArtifactDockMessage, type ArtifactDockStreamEvent, type ArtifactKind, type ArtifactScope, type ComposerFile, type ComposerFileRejection, type ComposerFileValidationConfig, DEFAULT_REASONING_LEVEL_OPTIONS, HARNESS_REASONING_OPTIONS, type MentionItem, type ReasoningLevel, type ReasoningLevelOption, ReasoningLevelPicker, type ReasoningLevelPickerProps, createFetchTransport, isAcceptedType, isModelCompatibleWithHarness, snapModelToHarness, validateComposerFiles };
598
+ export { AgentComposer, type AgentComposerMention, type AgentComposerProps, type AgentProfileCapability, type AgentProfileDraft, type AgentProfileOption, AgentProfilePicker, type AgentProfilePickerProps, AgentSessionControls, type AgentSessionControlsProps, type AgentSessionHarnessControl, type AgentSessionModelControl, type AgentSessionProfileControl, type AgentSessionReasoningControl, ArtifactAgentDock, type ArtifactAgentDockProps, type ArtifactAgentDockTransport, type ArtifactDockMessage, type ArtifactDockStreamEvent, type ArtifactKind, type ArtifactScope, type ComposerFile, type ComposerFileRejection, type ComposerFileValidationConfig, DEFAULT_REASONING_LEVEL_OPTIONS, HARNESS_REASONING_OPTIONS, MENTION_PILL_CLASS, type MentionItem, type ReasoningLevel, type ReasoningLevelOption, ReasoningLevelPicker, type ReasoningLevelPickerProps, createFetchTransport, isAcceptedType, isModelCompatibleWithHarness, snapModelToHarness, validateComposerFiles };
package/dist/chat.js CHANGED
@@ -19,8 +19,11 @@ import {
19
19
  snapHarnessToModel,
20
20
  snapModelToHarness,
21
21
  validateComposerFiles
22
- } from "./chunk-PKZVCCZ6.js";
22
+ } from "./chunk-R5OVYRIY.js";
23
23
  import "./chunk-TK46XFLM.js";
24
+ import {
25
+ MENTION_PILL_CLASS
26
+ } from "./chunk-WGOOQAW3.js";
24
27
  import "./chunk-2T6KBMLN.js";
25
28
  import "./chunk-R4AR3TKR.js";
26
29
  import "./chunk-I3G23XHN.js";
@@ -36,6 +39,7 @@ export {
36
39
  ChatMessage,
37
40
  DEFAULT_REASONING_LEVEL_OPTIONS,
38
41
  HARNESS_REASONING_OPTIONS,
42
+ MENTION_PILL_CLASS,
39
43
  MessageList,
40
44
  ReasoningLevelPicker,
41
45
  ThinkingIndicator,
@@ -1147,7 +1147,7 @@ function imageExtension(file) {
1147
1147
  const fromName = /\.([a-z0-9]+)$/i.exec(file.name)?.[1];
1148
1148
  return fromName?.toLowerCase() ?? "png";
1149
1149
  }
1150
- var MentionEditor = React4.lazy(() => import("./mention-editor-7FLUUWY5.js"));
1150
+ var MentionEditor = React4.lazy(() => import("./mention-editor-6PITHKPR.js"));
1151
1151
  function AgentComposer({
1152
1152
  value,
1153
1153
  onChange,
@@ -0,0 +1,12 @@
1
+ import {
2
+ cn
3
+ } from "./chunk-EI44GEQ5.js";
4
+
5
+ // src/chat/mention-pill.ts
6
+ var MENTION_PILL_CLASS = cn(
7
+ "rounded-md bg-primary/10 px-1 py-0.5 font-medium text-primary"
8
+ );
9
+
10
+ export {
11
+ MENTION_PILL_CLASS
12
+ };
package/dist/globals.css CHANGED
@@ -2037,6 +2037,12 @@
2037
2037
  border-color: color-mix(in oklab, var(--color-primary) 30%, transparent);
2038
2038
  }
2039
2039
  }
2040
+ .border-primary\/40 {
2041
+ border-color: color-mix(in srgb, hsl(var(--primary)) 40%, transparent);
2042
+ @supports (color: color-mix(in lab, red, red)) {
2043
+ border-color: color-mix(in oklab, var(--color-primary) 40%, transparent);
2044
+ }
2045
+ }
2040
2046
  .border-primary\/50 {
2041
2047
  border-color: color-mix(in srgb, hsl(var(--primary)) 50%, transparent);
2042
2048
  @supports (color: color-mix(in lab, red, red)) {
package/dist/index.d.ts CHANGED
@@ -5,7 +5,7 @@ export { AgentWorkbench, ApprovalConfidenceStat, ApprovalItem, ApprovalQueue, Ap
5
5
  export { ArtifactView, BRAND_PRISM_THEME, CodeSurface, CodeSurfaceProps, CodeView, CodeViewProps, DiffStats, DiffView, DiffViewProps, FileBreadcrumb, FileBreadcrumbProps, GitStatusBadge, PanelHeader, PanelHeaderProps, PillTabItem, PillTabs, PillTabsProps, PreviewView, PreviewViewProps, SandboxArtifact, SandboxArtifactPane, SandboxArtifactPaneProps, SandboxArtifactTerminal, buildUnifiedPatch, computeDiffStats, resolveLanguage } from './workbench.js';
6
6
  export { OpenUIAction, OpenUIActionsNode, OpenUIArtifactRenderer, OpenUIArtifactRendererProps, OpenUIBadgeNode, OpenUICardNode, OpenUICodeNode, OpenUIComponentNode, OpenUIGridNode, OpenUIHeadingNode, OpenUIKeyValueNode, OpenUIMarkdownNode, OpenUIPrimitive, OpenUISeparatorNode, OpenUIStackNode, OpenUIStatNode, OpenUITableNode, OpenUITextNode } from '@tangle-network/ui/openui';
7
7
  export { AgentTimeline, AgentTimelineArtifactItem, AgentTimelineCustomItem, AgentTimelineItem, AgentTimelineMessageItem, AgentTimelineProps, AgentTimelineStatusItem, AgentTimelineTone, AgentTimelineToolGroupItem, AgentTimelineToolItem, ChatContainer, ChatContainerProps, ChatMessage, ChatMessageProps, MessageList, MessageListProps, MessageRole, ThinkingIndicator, ThinkingIndicatorProps, UserMessage, UserMessageProps } from '@tangle-network/ui/chat';
8
- export { AgentComposer, AgentComposerMention, AgentComposerProps, AgentProfileCapability, AgentProfileDraft, AgentProfileOption, AgentProfilePicker, AgentProfilePickerProps, AgentSessionControls, AgentSessionControlsProps, AgentSessionHarnessControl, AgentSessionModelControl, AgentSessionProfileControl, AgentSessionReasoningControl, ArtifactAgentDock, ArtifactAgentDockProps, ArtifactAgentDockTransport, ArtifactDockMessage, ArtifactDockStreamEvent, ArtifactKind, ArtifactScope, ComposerFile, ComposerFileRejection, ComposerFileValidationConfig, DEFAULT_REASONING_LEVEL_OPTIONS, HARNESS_REASONING_OPTIONS, MentionItem, ReasoningLevel, ReasoningLevelOption, ReasoningLevelPicker, ReasoningLevelPickerProps, createFetchTransport, isAcceptedType, isModelCompatibleWithHarness, snapModelToHarness, validateComposerFiles } from './chat.js';
8
+ export { AgentComposer, AgentComposerMention, AgentComposerProps, AgentProfileCapability, AgentProfileDraft, AgentProfileOption, AgentProfilePicker, AgentProfilePickerProps, AgentSessionControls, AgentSessionControlsProps, AgentSessionHarnessControl, AgentSessionModelControl, AgentSessionProfileControl, AgentSessionReasoningControl, ArtifactAgentDock, ArtifactAgentDockProps, ArtifactAgentDockTransport, ArtifactDockMessage, ArtifactDockStreamEvent, ArtifactKind, ArtifactScope, ComposerFile, ComposerFileRejection, ComposerFileValidationConfig, DEFAULT_REASONING_LEVEL_OPTIONS, HARNESS_REASONING_OPTIONS, MENTION_PILL_CLASS, MentionItem, ReasoningLevel, ReasoningLevelOption, ReasoningLevelPicker, ReasoningLevelPickerProps, createFetchTransport, isAcceptedType, isModelCompatibleWithHarness, snapModelToHarness, validateComposerFiles } from './chat.js';
9
9
  export { ExpandedToolDetail, ExpandedToolDetailProps, InlineThinkingItem, InlineThinkingItemProps, InlineToolItem, InlineToolItemProps, LiveDuration, RunGroup, RunGroupProps } from '@tangle-network/ui/run';
10
10
  export { CommandPreview, DiffPreview, GlobResultsPreview, GrepResultsPreview, QuestionPreview, WebSearchPreview, WriteFilePreview } from '@tangle-network/ui/tool-previews';
11
11
  export { FileArtifactPane, FileArtifactPaneProps, FileNode, FilePreview, FilePreviewProps, FileTabData, FileTabs, FileTabsProps, FileTree, FileTreeProps, FileTreeVisibilityOptions, RichFileTree, RichFileTreeGitEntry, RichFileTreeGitStatus, RichFileTreeProps, RichFileTreeThemeVars, filterFileTree } from '@tangle-network/ui/files';
package/dist/index.js CHANGED
@@ -91,7 +91,7 @@ import {
91
91
  snapHarnessToModel,
92
92
  snapModelToHarness,
93
93
  validateComposerFiles
94
- } from "./chunk-PKZVCCZ6.js";
94
+ } from "./chunk-R5OVYRIY.js";
95
95
  import {
96
96
  TOOL_CATEGORY_ICONS,
97
97
  cn,
@@ -105,6 +105,9 @@ import {
105
105
  timeAgo,
106
106
  truncateText
107
107
  } from "./chunk-TK46XFLM.js";
108
+ import {
109
+ MENTION_PILL_CLASS
110
+ } from "./chunk-WGOOQAW3.js";
108
111
  import {
109
112
  ExpandedToolDetail,
110
113
  InlineThinkingItem,
@@ -455,6 +458,7 @@ export {
455
458
  LiveDuration,
456
459
  LoginLayout,
457
460
  Logo,
461
+ MENTION_PILL_CLASS,
458
462
  Markdown,
459
463
  MessageList,
460
464
  MetricAreaChart,
@@ -1,3 +1,6 @@
1
+ import {
2
+ MENTION_PILL_CLASS
3
+ } from "./chunk-WGOOQAW3.js";
1
4
  import {
2
5
  cn
3
6
  } from "./chunk-EI44GEQ5.js";
@@ -16,7 +19,15 @@ import { Loader2 } from "lucide-react";
16
19
  import * as React from "react";
17
20
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
18
21
  var MentionList = React.forwardRef(
19
- function MentionList2({ items, loading, error, emptyText = "No matches", renderItem, onSelect }, ref) {
22
+ function MentionList2({
23
+ items,
24
+ loading,
25
+ error,
26
+ emptyText = "No matches",
27
+ renderItem,
28
+ onSelect,
29
+ className
30
+ }, ref) {
20
31
  const [selected, setSelected] = React.useState(0);
21
32
  const selectedRef = React.useRef(0);
22
33
  const move = (next) => {
@@ -55,8 +66,9 @@ var MentionList = React.forwardRef(
55
66
  role: "listbox",
56
67
  "aria-label": "File mentions",
57
68
  className: cn(
58
- "max-h-64 min-w-[16rem] max-w-sm overflow-y-auto rounded-xl border border-[var(--md3-outline-variant)]",
59
- "bg-surface-container-high p-1 shadow-lg"
69
+ "max-h-64 min-w-[16rem] max-w-sm overflow-y-auto rounded-xl border border-border",
70
+ "bg-popover text-popover-foreground p-1 shadow-lg",
71
+ className
60
72
  ),
61
73
  children: [
62
74
  loading && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 px-2.5 py-2 text-muted-foreground text-sm", children: [
@@ -207,9 +219,6 @@ function buildComposerStarterKit() {
207
219
  underline: false
208
220
  });
209
221
  }
210
- var MENTION_PILL_CLASS = cn(
211
- "rounded-md bg-primary/10 px-1 py-0.5 font-medium text-primary"
212
- );
213
222
  function buildMentionExtension(trigger, suggestion) {
214
223
  return Mention.extend({
215
224
  addAttributes() {
@@ -460,7 +469,8 @@ function MentionEditor({
460
469
  error: errored,
461
470
  emptyText: mention.emptyText,
462
471
  renderItem: mention.renderItem,
463
- onSelect: (item) => commandRef.current?.(item)
472
+ onSelect: (item) => commandRef.current?.(item),
473
+ className: mention.popoverClassName
464
474
  }
465
475
  )
466
476
  }
package/dist/styles.css CHANGED
@@ -2037,6 +2037,12 @@
2037
2037
  border-color: color-mix(in oklab, var(--color-primary) 30%, transparent);
2038
2038
  }
2039
2039
  }
2040
+ .border-primary\/40 {
2041
+ border-color: color-mix(in srgb, hsl(var(--primary)) 40%, transparent);
2042
+ @supports (color: color-mix(in lab, red, red)) {
2043
+ border-color: color-mix(in oklab, var(--color-primary) 40%, transparent);
2044
+ }
2045
+ }
2040
2046
  .border-primary\/50 {
2041
2047
  border-color: color-mix(in srgb, hsl(var(--primary)) 50%, transparent);
2042
2048
  @supports (color: color-mix(in lab, red, red)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/sandbox-ui",
3
- "version": "0.86.0",
3
+ "version": "0.87.0",
4
4
  "description": "Unified UI component library for Tangle Sandbox — primitives, chat, dashboard, terminal, editor, and workspace components",
5
5
  "repository": {
6
6
  "type": "git",