@tangle-network/ui 11.11.1 → 11.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @tangle-network/ui
2
2
 
3
+ ## 11.11.2
4
+
5
+ ### Patch Changes
6
+
7
+ - 658ae83: Use each colored AgentTimeline card's tone foreground for its status detail and artifact text.
8
+ Keep neutral cards on the normal muted foreground.
9
+
3
10
  ## 11.11.1
4
11
 
5
12
  ### Patch Changes
@@ -120,26 +120,31 @@ const TONE_STYLES = {
120
120
  default: {
121
121
  card: "border-border bg-card",
122
122
  text: "text-foreground",
123
+ supportingText: "text-muted-foreground",
123
124
  icon: CircleDot
124
125
  },
125
126
  info: {
126
127
  card: "border-[var(--surface-info-border)] bg-[var(--surface-info-bg)]",
127
128
  text: "text-[var(--surface-info-text)]",
129
+ supportingText: "text-[var(--surface-info-text)]",
128
130
  icon: Info
129
131
  },
130
132
  success: {
131
133
  card: "border-[var(--surface-success-border)] bg-[var(--surface-success-bg)]",
132
134
  text: "text-[var(--surface-success-text)]",
135
+ supportingText: "text-[var(--surface-success-text)]",
133
136
  icon: CheckCircle2
134
137
  },
135
138
  warning: {
136
139
  card: "border-[var(--surface-warning-border)] bg-[var(--surface-warning-bg)]",
137
140
  text: "text-[var(--surface-warning-text)]",
141
+ supportingText: "text-[var(--surface-warning-text)]",
138
142
  icon: AlertTriangle
139
143
  },
140
144
  error: {
141
145
  card: "border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)]",
142
146
  text: "text-[var(--surface-danger-text)]",
147
+ supportingText: "text-[var(--surface-danger-text)]",
143
148
  icon: AlertTriangle
144
149
  }
145
150
  };
@@ -190,7 +195,7 @@ function StatusCard({ item }) {
190
195
  className: cn("text-sm font-medium", tone.text),
191
196
  children: item.label
192
197
  }), item.detail && /* @__PURE__ */ jsx("div", {
193
- className: "mt-0.5 text-sm text-muted-foreground",
198
+ className: cn("mt-0.5 text-sm", tone.supportingText),
194
199
  children: item.detail
195
200
  })]
196
201
  })]
@@ -212,15 +217,15 @@ function ArtifactCard({ item }) {
212
217
  className: "min-w-0 flex-1",
213
218
  children: [
214
219
  /* @__PURE__ */ jsx("div", {
215
- className: "text-sm font-medium text-foreground",
220
+ className: cn("text-sm font-medium", tone.text),
216
221
  children: item.title
217
222
  }),
218
223
  item.description && /* @__PURE__ */ jsx("div", {
219
- className: "mt-1 text-sm text-muted-foreground",
224
+ className: cn("mt-1 text-sm", tone.supportingText),
220
225
  children: item.description
221
226
  }),
222
227
  item.meta && /* @__PURE__ */ jsx("div", {
223
- className: "mt-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",
228
+ className: cn("mt-2 flex flex-wrap items-center gap-2 text-xs", tone.supportingText),
224
229
  children: item.meta
225
230
  })
226
231
  ]
package/dist/chat.js CHANGED
@@ -1,2 +1,2 @@
1
- import { a as MessageList, i as ThinkingIndicator, n as ChatContainer, o as UserMessage, r as AgentTimeline, t as ChatMessage } from "./chat-D4jAfEmj.js";
1
+ import { a as MessageList, i as ThinkingIndicator, n as ChatContainer, o as UserMessage, r as AgentTimeline, t as ChatMessage } from "./chat-D-9Fm8A4.js";
2
2
  export { AgentTimeline, ChatContainer, ChatMessage, MessageList, ThinkingIndicator, UserMessage };
package/dist/index.js CHANGED
@@ -17,7 +17,7 @@ import { a as RunRowStatusDot, i as RunRowShell, o as ExpandedToolDetail, r as I
17
17
  import { t as Markdown } from "./markdown-BGqicV82.js";
18
18
  import { n as InlineThinkingItem, t as RunGroup } from "./run-group-BACLbCFl.js";
19
19
  import { t as OpenUIArtifactRenderer } from "./openui-artifact-renderer-DrU1AdVk.js";
20
- import { a as MessageList, i as ThinkingIndicator, n as ChatContainer, o as UserMessage, r as AgentTimeline, t as ChatMessage } from "./chat-D4jAfEmj.js";
20
+ import { a as MessageList, i as ThinkingIndicator, n as ChatContainer, o as UserMessage, r as AgentTimeline, t as ChatMessage } from "./chat-D-9Fm8A4.js";
21
21
  import { t as LiveDuration } from "./run-ZsIKPA6J.js";
22
22
  import { n as parseToolEvent, t as ToolCallFeed } from "./tool-call-feed-Djt2q11V.js";
23
23
  import "./openui.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/ui",
3
- "version": "11.11.1",
3
+ "version": "11.11.2",
4
4
  "description": "Generic React UI components for Tangle products — primitives, chat, run, files, editor, markdown.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -450,6 +450,21 @@ export const StatusTones: Story = {
450
450
  },
451
451
  }
452
452
 
453
+ export const ErrorArtifact: Story = {
454
+ args: {
455
+ items: [
456
+ {
457
+ id: 'artifact-error',
458
+ kind: 'artifact',
459
+ title: 'Build output',
460
+ description: 'The compiler stopped before writing the bundle.',
461
+ meta: 'Exit code 1',
462
+ tone: 'error',
463
+ },
464
+ ],
465
+ },
466
+ }
467
+
453
468
  // ---------------------------------------------------------------------------
454
469
  // Full transcript through ChatContainer — the real consumer path. Tool titles
455
470
  // and descriptions come from `getToolDisplayMetadata`, so this story shows the
@@ -101,30 +101,35 @@ export interface AgentTimelineProps {
101
101
  collapseAfter?: number;
102
102
  }
103
103
 
104
- const TONE_STYLES: Record<AgentTimelineTone, { card: string; text: string; icon: typeof Info }> = {
104
+ const TONE_STYLES: Record<AgentTimelineTone, { card: string; text: string; supportingText: string; icon: typeof Info }> = {
105
105
  default: {
106
106
  card: "border-border bg-card",
107
107
  text: "text-foreground",
108
+ supportingText: "text-muted-foreground",
108
109
  icon: CircleDot,
109
110
  },
110
111
  info: {
111
112
  card: "border-[var(--surface-info-border)] bg-[var(--surface-info-bg)]",
112
113
  text: "text-[var(--surface-info-text)]",
114
+ supportingText: "text-[var(--surface-info-text)]",
113
115
  icon: Info,
114
116
  },
115
117
  success: {
116
118
  card: "border-[var(--surface-success-border)] bg-[var(--surface-success-bg)]",
117
119
  text: "text-[var(--surface-success-text)]",
120
+ supportingText: "text-[var(--surface-success-text)]",
118
121
  icon: CheckCircle2,
119
122
  },
120
123
  warning: {
121
124
  card: "border-[var(--surface-warning-border)] bg-[var(--surface-warning-bg)]",
122
125
  text: "text-[var(--surface-warning-text)]",
126
+ supportingText: "text-[var(--surface-warning-text)]",
123
127
  icon: AlertTriangle,
124
128
  },
125
129
  error: {
126
130
  card: "border-[var(--surface-danger-border)] bg-[var(--surface-danger-bg)]",
127
131
  text: "text-[var(--surface-danger-text)]",
132
+ supportingText: "text-[var(--surface-danger-text)]",
128
133
  icon: AlertTriangle,
129
134
  },
130
135
  };
@@ -191,7 +196,7 @@ function StatusCard({ item }: { item: AgentTimelineStatusItem }) {
191
196
  <div className="min-w-0">
192
197
  <div className={cn("text-sm font-medium", tone.text)}>{item.label}</div>
193
198
  {item.detail && (
194
- <div className="mt-0.5 text-sm text-muted-foreground">{item.detail}</div>
199
+ <div className={cn("mt-0.5 text-sm", tone.supportingText)}>{item.detail}</div>
195
200
  )}
196
201
  </div>
197
202
  </div>
@@ -208,12 +213,12 @@ function ArtifactCard({ item }: { item: AgentTimelineArtifactItem }) {
208
213
  {item.icon ?? <FileText className="h-4 w-4" />}
209
214
  </div>
210
215
  <div className="min-w-0 flex-1">
211
- <div className="text-sm font-medium text-foreground">{item.title}</div>
216
+ <div className={cn("text-sm font-medium", tone.text)}>{item.title}</div>
212
217
  {item.description && (
213
- <div className="mt-1 text-sm text-muted-foreground">{item.description}</div>
218
+ <div className={cn("mt-1 text-sm", tone.supportingText)}>{item.description}</div>
214
219
  )}
215
220
  {item.meta && (
216
- <div className="mt-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground">
221
+ <div className={cn("mt-2 flex flex-wrap items-center gap-2 text-xs", tone.supportingText)}>
217
222
  {item.meta}
218
223
  </div>
219
224
  )}